-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
build llvm libunwind.a in rustbuild #85600
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I can't figure out how to bump the version of bootstrap compiler.
|
This comment has been minimized.
This comment has been minimized.
1f42beb
to
a534b72
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a534b72
to
a5ce091
Compare
@12101111 |
(Removed the draft status, it's meaningless with our |
|
This comment has been minimized.
This comment has been minimized.
a5ce091
to
4e482df
Compare
Some linking test on x86_64-unknown-linux-musl target:
RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=yes -Clink-arg=-Wl,--verbose"
RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=no -Clink-arg=-Wl,--verbose"
RUSTFLAGS="-Ctarget-feature=-crt-static -Clink-self-contained=no -Clink-arg=-Wl,--verbose"
This combination doesn't make sense, but I still test it: RUSTFLAGS="-Ctarget-feature=-crt-static -Clink-self-contained=yes -Clink-arg=-Wl,--verbose"
|
Ping from triage: |
8e5344e
to
32ab4bb
Compare
This pr is current blocked by #88227 or some other fix to deal with the linking error |
32ab4bb
to
9a53d59
Compare
@bors r+ |
📌 Commit 9a53d59 has been approved by |
☀️ Test successful - checks-actions |
Getting
now when trying to build a binary using the
|
export RUSTFLAGS="-Clink-self-contained=yes"
It seems this option should be enabled for rust/compiler/rustc_codegen_ssa/src/back/link.rs Lines 1495 to 1508 in dbb0fe9
|
Somewhat surprising (to me) this change lead to a small regression in instruction counts. Given that the regressions are all quite small, I don't think we need to look into this, but I wouldn't have expected to see a regression in instruction counts from a change in how we're building libunwind. |
…tained, r=petrochenkov Fix LLVM libunwind build for non-musl targets Broken in rust-lang#85600. AFAICT, [only musl, mingw, and wasm](https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/compiler/rustc_target/src/spec/crt_objects.rs#L128-L132) should use the “self-contained” logic in rustbuild.
…tained, r=petrochenkov Fix LLVM libunwind build for non-musl targets Broken in rust-lang#85600. AFAICT, [only musl, mingw, and wasm](https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/compiler/rustc_target/src/spec/crt_objects.rs#L128-L132) should use the “self-contained” logic in rustbuild.
rust-lang/rust#85600 changed libunwind building process
This PR move the building of llvm-libunwind from build script of libunwind to rustbuild, so user don't need a C compiler and recompile this C/C++ library when using build-std, and user can use codegen flags
link-self-contained
and cargo flagbuild-std-features
to control the behavior of libunwind linking.