Bump cc to 1.2.16 to fix x86 windows jobs in rust-lang/rust CI
#15245
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
GitHub Runner Images 20250224.5.0+ ship Windows 11 SDK 10.0.26100+ compared to the previous Windows 11 SDK 10.0.22621, which bumped the UCRT headers. The new UCRT headers use SSE2 types. However,
ccversions <= 1.2.15 emit/arch:IA32forx86Windows targets forclang-cl, which causes compilation errors sinceclang-clcan't find SSE2 types without/arch:SSE2specified (or defaulted). (Note that MSVC at the time of writing silently accepts and emits instruments for code using SSE2 types, as opposed toclang-clhard error-ing).cc1.2.16 contains a fix for this problem, rust-lang/cc-rs#1425, to correctly emit/arch:SSE2instead of/arch:IA32to enableclang-clto find the SSE2 types. However, cargo'scccurrently is still on 1.2.13.To fix this for rust-lang/rust CI, we need to bump anything that transitively relies on
ccand tries to useclang-clonx86Windows targets to compile any C/C++ code that transitively use functions or types that require SSE2 types, such as<wchar.h>.How should we test and review this PR?
The fix was initially intended for
rustc_{codegen_ssa,llvm}cc, and based on testing in rust-lang/rust#137724, I was able to successfully buildrustc_{codegen_ssa,llvm}with a forkedccbased on 1.2.15 which contains the fix from rust-lang/cc-rs#1425. Note that in the same PR, while the compiler build succeeded, the build of cargo itself failed since it transitively used accwithout the fix to buildcurl-sys1, which failed as one might expect (curl-systries to build C code that uses<wchar.h>which runs into the same problem). Hence, this PR is opened to bump cargo'sccto accversion containing the fix.Additional information
This
x86Windows CI problem is:ccchangelog between 1.2.13 and 1.2.16`cc` changes since 1.2.13 up to and including 1.2.16
1.2.16 - 2025-02-28
Fixed
out_dirto prevent artifacts in cwd (Generated .gitignore should only ignore top-level target directory #1415)Other
/arch:SSE2forx86target arch (Re-fix thehelpcommand's implementation #1425)1.2.15 - 2025-02-21
Other
CFLAGS-style flags (#1401)Commandinvocation (#1397)1.2.14 - 2025-02-14
Other
-gdwarf-{version}based on RUSTFLAGS (#1395)Footnotes
I think the dep chain is something like git2 -> libgit2-sys -> curl -> curl-sys? ↩