Skip to content

DependencyScanner: add a new extraPcmArgs field for each Swift module #32304

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 3 commits into from
Jun 16, 2020

Conversation

nkcsgexi
Copy link
Contributor

Building each Swift module explicitly requires dependency PCMs to be built
with the exactly same deployment target version. This means we may need to
build a Clang module multiple times with different target triples.

This patch removes the -target arguments from the reported PCM build
arguments and inserts extraPcmArgs fields to each Swift module.
swift-driver can combine the generic PCM arguments with these extra arguments
to get the command suitable for building a PCM specifically for
that loading Swift module.

@nkcsgexi nkcsgexi requested a review from artemcm June 10, 2020 23:23
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@artemcm artemcm self-requested a review June 11, 2020 00:19
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

2 similar comments
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

@artemcm This will break the swift-driver side test for end-to-end explicit module building. Should we hold on merging this?

@artemcm
Copy link
Contributor

artemcm commented Jun 11, 2020

@artemcm This will break the swift-driver side test for end-to-end explicit module building. Should we hold on merging this?

Good call. I'll grab this PR for testing while developing the swift-driver side and will ping you once we can merge them both. 👍

@nkcsgexi
Copy link
Contributor Author

Good call. I'll grab this PR for testing while developing the swift-driver side and will ping you once we can merge them both. 👍

Thank you!

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

nkcsgexi added 2 commits June 16, 2020 09:42
Building each Swift module explicitly requires dependency PCMs to be built
with the exactly same deployment target version. This means we may need to
build a Clang module multiple times with different target triples.

This patch removes the -target arguments from the reported PCM build
arguments and inserts extraPcmArgs fields to each Swift module.
swift-driver can combine the generic PCM arguments with these extra arguments
to get the command suitable for building a PCM specifically for
that loading Swift module.
These tests are duplicates of those from swift-driver.
…ents

Swift interface files may specify the effective language version to use. When building
a PCM loadable for these textual interface files, we should respect the language
version. This patch moves -fapinotes-swift-version from the generic PCM
commands to the extra PCM arguments owned by each loading Swift module.
@nkcsgexi
Copy link
Contributor Author

@swift-ci please smoke test

@nkcsgexi nkcsgexi merged commit 15c8c26 into swiftlang:master Jun 16, 2020
@nkcsgexi
Copy link
Contributor Author

@artemcm Merged

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