-
Notifications
You must be signed in to change notification settings - Fork 459
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
Deployment target incorrect in rust-std assets on apple platforms #1171
Comments
From your options I think its better if Rust's CI sets the environment variable to control it. imo I do sympathize and apologize for the upstream bug :( I don't think this is for Long-winded tangent time, though: We have significantly struggled to find the "right default" for everyone now that Rust's deployment target can be different then 7.0 from years ago. We nuked the |
Actually, do you think it would be viable to revisit that now that the default deployment target is 10.12? From what I can tell from #900, it seems like it broke a lot of builds back then when set to macOS 10.7, which was lower than the 10.9 that was require to link certain C++ libraries, but did you encounter other problems? |
…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
After this PR, the rust-std assets built in CI (nightly/beta/stable/etc) have an incorrect deployment target on darwin. rust-std was relying on. rusts' default targets when
IPHONEOS_DEPLOYMENT_TARGET
was not set and the CI job does not include that env var.Meaning that when rust-std is built with the
c
feature (it is for all assets), the rust-std rlib takes the maximumminos
which thanks tolibcompile-rt
is now the hostsdk-version
.Related issue rust-lang/compiler-builtins#650 (comment)
I proposed two solutions in the previous issue, let me know if you think of a third.
cc @BlackHoleFox
The text was updated successfully, but these errors were encountered: