about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/enum-option.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-04 19:41:14 +0200
committerGitHub <noreply@github.com>2023-06-04 19:41:14 +0200
commitef2c64ba6c49417907502128e3d4672855ee16a9 (patch)
tree3319af45540bd4984a8c56382d7a35241c8824e8 /tests/rustdoc-js-std/enum-option.js
parente04e19d2229a48f5b4cb68e832121f9cadbb2fa3 (diff)
parent4117b5e65bdcace7df94fe28a621f252d4a9412d (diff)
downloadrust-ef2c64ba6c49417907502128e3d4672855ee16a9.tar.gz
rust-ef2c64ba6c49417907502128e3d4672855ee16a9.zip
Rollup merge of #112247 - lqd:lld-rpath, r=Mark-Simulacrum
rust-lld: add rpath entry to the correct `lib` folder

An explanation, for our linux rustup toolchain:
- `lld` / `rust-lld` is built as a regular LLVM tool, but is not distributed via the `llvm-tools` component. It's distributed by default, like a regular rust binary, like cargo and rustc. The general expected setup is: binaries in `bin` and libraries in `lib`, so the rpath we use for a `bin/$executable` is `$ORIGIN/../lib`.
- However, `rust-lld` is _not_ in the same location as our other executables (`$root/bin`), it's in `$root/lib/rustlib/$host/bin/`. The current rpath thus expects the LLVM's shared library to be in `$root/lib/rustlib/$host/lib/`.
- That .so is only present in `$root/lib`, causing #80703. (LLVM's shared library is also copied to `$root/lib/rustlib/$host/lib/` with the `llvm-tools` component, so it also was [a workaround for the issue](https://github.com/rust-lang/rust/issues/80703#issuecomment-1574788504))

rustup's `LD_LIBRARY_PATH` overrides made this discrepancy invisible when we switched to `llvm.link-shared = true`, and this only showed up when running `rustc` or `rust-lld`'s executables directly.

To fix this we could:
- copy the .so to this expected location all the time, but that seems wasteful.
- or, add an rpath entry when building LLD, which seems preferable to me (but I don't know if it could cause issues).

This PR does the latter, tweaking how bootstrap builds LLD to point to the expected directory, and fixes #80703.

(Since this is related to P-high issues about switching to lld by default, I'll cc `@petrochenkov` to keep them updated.)
Diffstat (limited to 'tests/rustdoc-js-std/enum-option.js')
0 files changed, 0 insertions, 0 deletions