Skip to content

Commit

Permalink
Auto merge of #116276 - lqd:lld-sysroot, r=onur-ozkan
Browse files Browse the repository at this point in the history
bootstrap: copy self-contained linking components to `stage0-sysroot`

I hit this issue while trying to bootstrap using a rustc where `rust-lld` is used by default: this was the cause of the failure to profile rustc-perf's bootstrap benchmark in rust-lang/rust#113382.

`stage0-sysroot` currently only has libs and self-contained objects, not the other self-contained linking components yet. Most notably, it does not contain the linker and wrappers that we build, and that rustup distributes.

If you try to bootstrap using the bootstrap compiler's `rust-lld`, it will fail to link std at stage0 because `rust-lld` and the `gcc-ld` wrappers, will not be found in `stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/bin`.

This PR copies the `bin` directory next to the `lib` directory when `rust.lld` is enabled in the config (though maybe it could be done unconditionally, the fact that we need it to link does not necessarily mean that we'd want to build and provide it at stage1).

cc `@Kobzol` who also encountered this issue while using lld during bootstrap.
  • Loading branch information
bors committed Oct 2, 2023
2 parents 24dc151 + 9f21ea3 commit 20b0bb5
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 20b0bb5

Please sign in to comment.