-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.8][build] Make sure SPM is built with the forked clang, not the host clang #67328
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
@kateinoigakukun, would you run the CI on this? |
@swift-ci Please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We’re going to revert the original as it’s broken the SwiftPM option on build-script.
@swift-ci please test macOS |
@al45tair, what about this one? I can submit your SPM change for 5.8 too, then this should be fine. |
Yeah, the SwiftPM change needs cherry picking first. I was going to do that later on today (I'm build wrangler at the moment so I'm busy doing that right now). |
@al45tair, I can submit that 5.8 SPM pull with your commit for you if you're busy, just let me know. |
The cherry pick of that change is here: swiftlang/swift-package-manager#6754 |
@egorzhdan, one last CI run and we can get this in. |
I don't think we need a CI run so much as a branch manager to approve it. @tomerd you can do that I believe. |
@al45tair, this pull has not been run through the CI since your SPM pull was merged into 5.8 before the weekend, which is why I suggested it. |
@swift-ci Please test |
Linux CI failed when checking out the source, it seems super flaky this week. |
@swift-ci Please test Linux platform |
@bnbarham, one last linux CI run? |
@swift-ci Please test Linux platform |
@egorzhdan, one more linux CI run, please. |
@swift-ci please test Linux |
Whoo, it didn't crash at source checkout this time. 😄 |
@tomerd, ready for final approval and merge. |
Cherrypick of #64629
Explanation: SPM was built with the freshly-built Swift toolchain, including the Swift-forked clang, for years, but a change in swiftlang/swift-package-manager#5894 late last year inadvertently switched it to be built with the system clang used to natively build the Swift compiler, ie
self.toolchain.cc
inbuild-script
. That passed the CI but caused problems when cross-compiling SPM on my daily Android CI, as the system clang is only meant for native compilation- for example, we use the freshly-built Swift-forked clang for the native host by default when cross-compiling the Swift compiler itself- so I've been using this patch for the last seven months on my Android CI.Scope: Only affects the C/C++/asm files built as part of SwiftPM, particularly when cross-compiled
Issue: None
Risk: low, as this only affects compilation of non-Swift portions of SPM itself
Testing: Passed all CI on trunk and I've been using this on my Android CI since last year
Reviewer: @etcwilde