-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Always set the deployment target when building std #133092
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
fd382a0
to
dd8ca01
Compare
Okay... So this didn't actually work initially, since bootstrap is for some I've rebased and fixed that in the first and second commits, but it may break more than I think, so this should probably get a try build before merging. |
50812ff
to
2294b05
Compare
2294b05
to
f816d33
Compare
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. This PR modifies cc @jieyouxu |
Not sure if I should? It changes in theory (we pass different flags), but in practice it shouldn't (because those flags were already set by |
r=me modulo comment |
@bors r+ |
…t, r=Mark-Simulacrum 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 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#128419 Fixes rust-lang/compiler-builtins#650 See also rust-lang/cargo#13115 `@rustbot` label O-apple
Rollup of 7 pull requests Successful merges: - rust-lang#131323 (Support `clobber_abi` in AVR inline assembly) - rust-lang#133092 (Always set the deployment target when building std) - rust-lang#133134 (Don't use a SyntheticProvider for literally every type) - rust-lang#133538 (Better diagnostic for fn items in variadic functions) - rust-lang#133590 (Rename `-Zparse-only`) - rust-lang#133592 (Misc: better instructions for envrc, ignore `/build` instead of `build/`) - rust-lang#133608 (Revert rust-lang#133418 (Store coverage source regions as `Span`) due to regression rust-lang#133606) r? `@ghost` `@rustbot` modify labels: rollup
Could this have caused the failure at #133609 (comment)? |
This looks most likely I agree. |
☔ The latest upstream changes (presumably #133841) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #134096) made this pull request unmergeable. Please resolve the merge conflicts. |
@madsmtm |
Yeah, I'm aware that it failed, just haven't gotten around to looking into it yet |
ff3dab4
to
4e1dcf8
Compare
This comment has been minimized.
This comment has been minimized.
73af7e4
to
b91a267
Compare
This comment has been minimized.
This comment has been minimized.
d053536
to
55096ad
Compare
Okay, so I believe I've fixed that error, the issue was that bootstrap was setting Since it is unlikely that I caught everything, could someone do |
84f7291
to
bc33388
Compare
This comment has been minimized.
This comment has been minimized.
bc33388
to
a0331a4
Compare
Commands that end up invoking cc-rs, i.e. Cargo (through build scripts) and cmake-rs don't need the CFLAGS from cc-rs itself, as they will just end up as duplicates. We do still choose to pass them in certain places, but now it's at least clear which flags are default, and which flags are extra flags added on.
a0331a4
to
0a3fd1f
Compare
Actually, I decided to downscope this, as I realized there were more implications that I originally thought. Functionally, I've now split With that change done, passing the Finally, I've slightly tweaked |
Note that specifying MACOSX_STD_DEPLOYMENT_TARGET is still completely unnecessary here, but it's nice to have for future changes where we might want to version `std` and `rustc`'s deployment target separately.
cc
has a bug/feature (I guess depending on how you look at it) where the default deployment target is taken from the SDK instead of fromrustc
. This causescompiler-builtins
to buildcompiler-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 withotool -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 #128419
Fixes rust-lang/compiler-builtins#650
See also rust-lang/cargo#13115, rust-lang/cc-rs#1171
See #133092 (comment) for a description of how the change works.
@rustbot label O-apple