Skip to content

[Integrated Swift driver] Handle derived source files in the integrated driver. #2942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Sep 19, 2020

  • When computing command line arguments for the integrated driver invocation, append all source files, both belonging to the package and derived.
  • When writing out an output file map, add derived source files and their build artifacts to it as well.

Before this change, the [Implicit | Explicit] integrated driver flow ignores derived files when building a target and therefore is not able to handle targets with specified resource bundles, for example.

…ed driver.

- When computing command line arguments for the integrated driver invocation, append all source files, both user-written and derived.
- When writing out an output file map, add derived source files and their build artifacts to it as well.
@artemcm
Copy link
Contributor Author

artemcm commented Sep 19, 2020

@swift-ci please smoke test

@@ -831,7 +831,7 @@ public final class SwiftTargetBuildDescription {
stream <<< " },\n"

// Write out the entries for each source file.
let sources = target.sources.paths
let sources = target.sources.paths + derivedSources.paths
for (idx, source) in sources.enumerated() {
let object = objects[idx]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

objects are formed by taking sources + derivedSources and adding a .o extension so this enumeration will still hold.

@artemcm artemcm marked this pull request as ready for review September 19, 2020 00:46
@artemcm artemcm requested a review from DougGregor September 19, 2020 00:46
@artemcm
Copy link
Contributor Author

artemcm commented Sep 19, 2020

@swift-ci please smoke test Linux platform

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@artemcm
Copy link
Contributor Author

artemcm commented Sep 22, 2020

@swift-ci please smoke test

@artemcm artemcm merged commit 7afc6e2 into swiftlang:master Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants