Bump cc to 1.2.16 to fix x86 windows jobs in rust-lang/rust CI#15245
Merged
epage merged 1 commit intorust-lang:masterfrom Feb 28, 2025
Merged
Bump cc to 1.2.16 to fix x86 windows jobs in rust-lang/rust CI#15245epage merged 1 commit intorust-lang:masterfrom
cc to 1.2.16 to fix x86 windows jobs in rust-lang/rust CI#15245epage merged 1 commit intorust-lang:masterfrom
Conversation
GitHub Runner Images 20250224.5.0+ ship Windows 11 SDK 10.0.26100+ from 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` for `x86` Windows targets for `clang-cl`, which causes compilation errors since `clang-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 to `clang-cl` hard error-ing). To fix this for rust-lang/rust CI, we need to bump anything that transitively relies on `cc` and tries to use `clang-cl` on `x86` Windows targets to compile any C/C++ code that transitively use functions or types that require SSE2 types, such as `<wchar.h>`. `cc` 1.2.16 contains <rust-lang/cc-rs#1425> which emits `/arch:SSE2` instead of `/arch:IA32` for `x86` Windows targets when using `clang-cl`.
Collaborator
6 tasks
epage
approved these changes
Feb 28, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 28, 2025
Update cargo 11 commits in 1d1d646c06a84c1aa53967b394b7f1218f85db82..2622e844bc1e2e6123e54e94e4706f7b6195ce3d 2025-02-21 21:38:53 +0000 to 2025-02-28 12:33:57 +0000 - Bump `cc` to 1.2.16 to fix `x86` windows jobs in rust-lang/rust CI (rust-lang/cargo#15245) - refactor(tree): Abstract the concept of a NodeId (rust-lang/cargo#15237) - feat: implement RFC 3553 to add SBOM support (rust-lang/cargo#13709) - refactor(tree): Abstract the concept of an edge (rust-lang/cargo#15233) - chore: bump openssl to v3 (rust-lang/cargo#15232) - fix(package): Register workspace member renames in overlay (rust-lang/cargo#15228) - Implemented `build.build-dir` config option (rust-lang/cargo#15104) - feat: add completions for `--manifest-path` (rust-lang/cargo#15225) - chore: semver-check build-rs against beta channel (rust-lang/cargo#15223) - chore: depend on openssl-sys to correctly pin its version (rust-lang/cargo#15224) - chore: dont check cargo-util semver until 1.86 is released (rust-lang/cargo#15222)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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? ↩