Skip to content

Commit 4f47bf3

Browse files
authored
Merge pull request #2939 from artemcm/ExplicitSystemLibraryTargets
[Explicit Module Builds] Skip over binary and systemLibrary targets when generating explicit target build jobs
2 parents d59422f + 5b8b44b commit 4f47bf3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Sources/Build/ManifestBuilder.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,20 @@ extension LLBuildManifestBuilder {
323323
// product into its constituent targets.
324324
continue
325325
}
326+
guard target.underlyingTarget.type != .systemModule,
327+
target.underlyingTarget.type != .binary else {
328+
// Much like non-Swift targets, system modules will consist of a modulemap
329+
// somewhere in the filesystem, with the path to that module being either
330+
// manually-specified or computed based on the system module type (apt, brew).
331+
// Similarly, binary targets will bring in an .xcframework, the contents of
332+
// which will be exposed via search paths.
333+
//
334+
// In both cases, the dependency scanning action in the driver will be automatically
335+
// be able to detect such targets' modules.
336+
continue
337+
}
326338
guard let description = plan.targetMap[target] else {
327-
fatalError("Expected description for target: \(target)")
339+
fatalError("Expected description for target \(target)")
328340
}
329341
switch description {
330342
case .swift(let desc):

0 commit comments

Comments
 (0)