-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
patch rust-lld
and ld.lld
on NixOS
#126692
Conversation
r? @clubby789 rustbot has assigned @clubby789. Use |
cc @lqd This does fix the "bootstrap doesn't work on nixos" issue for me. |
r? @WaffleLapkin or other NixOS users Just trying to speed up this PR. Although we can configure an external linker, we might need to develop other platforms, like Wasm, for debugging. :) |
your desired nixos user is here |
patch `rust-lld` and `ld.lld` on NixOS When `rustc` uses its self-contained lld, we also need to patch `rust-lld` and `ld.lld`. The `rpath` for `rust-lld` is `$ORIGIN/../../../:$ORIGIN/../lib`, so I use `--add-rpath` instead of `--set-rpath`, which should be easier to maintain. I also changed `src/bootstrap/src/core/download.rs`, even this doesn't fix any known issues. For the `lld-wrapper.sh` of lld, refer to: rust-lang/rustc-dev-guide#1999.
But we still chose the worst operating system. 🤣 |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#125016 (Update compiler_builtins to 0.1.113) - rust-lang#126571 (Less `maybe_whole_expr`, take 2) - rust-lang#126692 (patch `rust-lld` and `ld.lld` on NixOS) - rust-lang#126721 (coverage: Make `#[coverage(..)]` apply recursively to nested functions) - rust-lang#126928 (Some `Nonterminal` removal precursors) - rust-lang#126929 (Remove `__rust_force_expr`.) - rust-lang#126970 (Simplify `str::clone_into`) - rust-lang#126980 (set self.is_known_utf8 to false in extend_from_slice) - rust-lang#126983 (Remove `f16` and `f128` ICE paths from smir) r? `@ghost` `@rustbot` modify labels: rollup
☀️ Test successful - checks-actions |
Finished benchmarking commit (1def498): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 694.579s -> 696.052s (0.21%) |
My understanding is that the issue will be fixed by any stage0 bump, as that will disable rust-lld, but it’s great to have it already fixed for the future when it’s purposefully enabled on beta. Thanks a bunch @DianQK! |
well, the other ones are worse |
When
rustc
uses its self-contained lld, we also need to patchrust-lld
andld.lld
.The
rpath
forrust-lld
is$ORIGIN/../../../:$ORIGIN/../lib
, so I use--add-rpath
instead of--set-rpath
, which should be easier to maintain.I also changed
src/bootstrap/src/core/download.rs
, even this doesn't fix any known issues.For the
lld-wrapper.sh
of lld, refer to: rust-lang/rustc-dev-guide#1999.