Skip to content

Commit

Permalink
Auto merge of #133092 - madsmtm:bootstrap-deployment-target, r=Mark-S…
Browse files Browse the repository at this point in the history
…imulacrum,jieyouxu

Always set the deployment target when building std

`cc` has [a bug/feature](rust-lang/cc-rs#1171) (I guess depending on how you look at it) where the default deployment target is taken from the SDK instead of from `rustc`. This causes `compiler-builtins` to build `compiler-rt` with the wrong deployment target on iOS.

I've been meaning to change how `cc` works in this regard, but that's a lengthy process, so let's fix it in bootstrap for now.

The behaviour can be seen locally with `./x build library --set build.optimized-compiler-builtins=true` for various target triples, and then inspecting with `otool -l build/host/stage1/lib/rustlib/*/lib/libcompiler_builtins-*.rlib | rg 'minos|version'`. I have added a rmake test that ensures that we now have the same version everywhere.

Fixes rust-lang/rust#128419
Fixes rust-lang/compiler-builtins#650
Fixes rust-lang/rust#136523
See also rust-lang/cargo#13115, rust-lang/cc-rs#1171, rust-lang/rust#136113
See rust-lang/rust#133092 (comment) for a description of how the change works.

try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: dist-apple-various
try-job: dist-aarch64-apple
try-job: dist-various-2
try-job: x86_64-fuchsia
  • Loading branch information
bors committed Feb 10, 2025
2 parents 8d2356d + 87c50e9 commit fd522f9
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit fd522f9

Please sign in to comment.