-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
Conversation
…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
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
03a9749
to
6f82cea
Compare
@swift-ci please test |
Build failed |
… 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.
@swift-ci please test |
Build failed |
@swift-ci Please test OS X platform |
Build failed |
@swift-ci Please test OS X platform |
rdar://72480261