Bump cc
to 1.2.16 to fix x86
windows jobs in rust-lang/rust CI
#15245
+2
−2
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,
cc
versions <= 1.2.15 emit/arch:IA32
forx86
Windows targets forclang-cl
, which causes compilation errors sinceclang-cl
can't find SSE2 types without/arch:SSE2
specified (or defaulted). (Note that MSVC at the time of writing silently accepts and emits instruments for code using SSE2 types, as opposed toclang-cl
hard error-ing).cc
1.2.16 contains a fix for this problem, rust-lang/cc-rs#1425, to correctly emit/arch:SSE2
instead of/arch:IA32
to enableclang-cl
to find the SSE2 types. However, cargo'scc
currently is still on 1.2.13.To fix this for rust-lang/rust CI, we need to bump anything that transitively relies on
cc
and tries to useclang-cl
onx86
Windows 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 forkedcc
based 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 acc
without the fix to buildcurl-sys
1, which failed as one might expect (curl-sys
tries to build C code that uses<wchar.h>
which runs into the same problem). Hence, this PR is opened to bump cargo'scc
to acc
version containing the fix.Additional information
This
x86
Windows CI problem is:cc
changelog 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_dir
to prevent artifacts in cwd (Generated .gitignore should only ignore top-level target directory #1415)Other
/arch:SSE2
forx86
target arch (Re-fix thehelp
command's implementation #1425)1.2.15 - 2025-02-21
Other
CFLAGS
-style flags (#1401)Command
invocation (#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? ↩