Skip to content

Commit 7afc6e2

Browse files
authored
Merge pull request #2942 from artemcm/IntegratedDriverDerivedSources
[Integrated Swift driver] Handle derived source files in the integrated driver.
2 parents 4f47bf3 + 7ab728d commit 7afc6e2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Sources/Build/BuildPlan.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public final class SwiftTargetBuildDescription {
702702
}
703703

704704
result.append("-c")
705-
result.append(contentsOf: target.sources.paths.map { $0.pathString })
705+
result.append(contentsOf: sources.map { $0.pathString })
706706

707707
result.append("-I")
708708
result.append(buildParameters.buildPath.pathString)
@@ -831,7 +831,7 @@ public final class SwiftTargetBuildDescription {
831831
stream <<< " },\n"
832832

833833
// Write out the entries for each source file.
834-
let sources = target.sources.paths
834+
let sources = target.sources.paths + derivedSources.paths
835835
for (idx, source) in sources.enumerated() {
836836
let object = objects[idx]
837837
let objectDir = object.parentDirectory

Sources/Build/ManifestBuilder.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,6 @@ extension LLBuildManifestBuilder {
362362

363363
// Commands.
364364
try addExplicitBuildSwiftCmds(description, inputs: inputs,
365-
objectNodes: objectNodes,
366-
moduleNode: moduleNode,
367365
targetDepGraphMap: &targetDepGraphMap)
368366

369367
addTargetCmd(description, cmdOutputs: cmdOutputs)
@@ -372,8 +370,7 @@ extension LLBuildManifestBuilder {
372370

373371
private func addExplicitBuildSwiftCmds(
374372
_ targetDescription: SwiftTargetBuildDescription,
375-
inputs: [Node], objectNodes: [Node], moduleNode: Node,
376-
targetDepGraphMap: inout [ResolvedTarget: InterModuleDependencyGraph]
373+
inputs: [Node], targetDepGraphMap: inout [ResolvedTarget: InterModuleDependencyGraph]
377374
) throws {
378375
// Pass the driver its external dependencies (target dependencies)
379376
var targetDependencyMap: SwiftDriver.ExternalDependencyArtifactMap = [:]

0 commit comments

Comments
 (0)