Skip to content

[5.5] cherry-pick -clang-target related changes. #38420

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 5 commits into from
Jul 17, 2021

Conversation

nkcsgexi
Copy link
Contributor

rdar://72480261

nkcsgexi added 3 commits July 15, 2021 16:51
…ng instance to use

Before this change, we always use the Swift target triple to instantiate the internal
Clang instance. When loading a Swift module from the textual interface, we may pick up
a lower target triple to use to build the Swift module because the target is hard-coded
in the textual interface file. This implies we may end up building multiple versions of the
same Clang module, one for each target triple of the loading Swift module.

This change adds a new frontend flag -clang-target to allow clients to specify a
consistent clang target to use across the Swift module boundaries. This value won't change
because it's not part of .swiftinterface files.

swift-driver should pass down -clang-target for each frontend invocation, and its value should be
identical to -target.

Related to: rdar://72480261
@nkcsgexi nkcsgexi requested a review from a team as a code owner July 15, 2021 23:53
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c608590

@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 03a97496cd69cc80b62fd75bf15ea716c361a927

@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6f82cea

… scanning an interface

swiftlang#37774 (related to rdar://72480261) has made it so that the target of built clang modules (even downstream from Swift interface dependencies) can be consistent with that of the main module. This means that when building transitive Clang dependencies of the main module, they will always have a matching triple to the main module itself (ensured with `-clang-target`). This means we no longer have to report the target triple in the set of `extraPCMArgs` which encode an interface-specific requirement for building its dependencies.
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - db668aa

@nkcsgexi
Copy link
Contributor Author

@swift-ci Please test OS X platform

@nkcsgexi nkcsgexi requested a review from artemcm July 16, 2021 16:08
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - db668aa

@nkcsgexi
Copy link
Contributor Author

@swift-ci Please test OS X platform

@nkcsgexi nkcsgexi merged commit 4e2fdbc into swiftlang:release/5.5 Jul 17, 2021
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.

4 participants