27e5457f3f
rustbuild: Tweak LLVM distribution layout This commit tweaks the layout of a few components that we distribute to hopefully fix across all platforms the recent issues with LLD being unable to find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic library, which means that LLVM tools by default link to LLVM dynamically rather than statically. This in turn means that the tools, at runtime, need to find the LLVM shared library. LLVM's shared library is currently distributed as part of the rustc component. This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are in two locations: * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld` * Other LLVM tools are shipped at `$sysroot/bin` Each LLVM tool has an embedded rpath directive indicating where it will search for dynamic libraries. This currently points to `../lib` and is presumably inserted by LLVM's build system. Unfortunately, though, this directive is only correct for the LLVM tools at `$sysroot/bin`, not LLD! This commit is targeted at fixing this situation by making two changes: * LLVM tools other than LLD are moved in the distribution to `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should position them for... * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib` Together this means that all tools should natively be able to find the shared object and the shared object should be installed all the time for the various tools. Overall this should... Closes #53813 |
||
---|---|---|
.. | ||
bootstrap | ||
build_helper | ||
ci | ||
dlmalloc@c99638dc2e | ||
doc | ||
etc | ||
grammar | ||
jemalloc@1f5a28755e | ||
liballoc | ||
liballoc_jemalloc | ||
liballoc_system | ||
libarena | ||
libbacktrace@f4d02bbdbf | ||
libcompiler_builtins@f3a13eb238 | ||
libcore | ||
libfmt_macros | ||
libgraphviz | ||
liblibc@1844a772b6 | ||
libpanic_abort | ||
libpanic_unwind | ||
libproc_macro | ||
libprofiler_builtins | ||
librustc | ||
librustc_allocator | ||
librustc_apfloat | ||
librustc_asan | ||
librustc_borrowck | ||
librustc_codegen_llvm | ||
librustc_codegen_utils | ||
librustc_cratesio_shim | ||
librustc_data_structures | ||
librustc_driver | ||
librustc_errors | ||
librustc_fs_util | ||
librustc_incremental | ||
librustc_lint | ||
librustc_llvm | ||
librustc_lsan | ||
librustc_metadata | ||
librustc_metadata_utils | ||
librustc_mir | ||
librustc_msan | ||
librustc_passes | ||
librustc_platform_intrinsics | ||
librustc_plugin | ||
librustc_privacy | ||
librustc_resolve | ||
librustc_save_analysis | ||
librustc_target | ||
librustc_traits | ||
librustc_tsan | ||
librustc_typeck | ||
librustdoc | ||
libserialize | ||
libstd | ||
libsyntax | ||
libsyntax_ext | ||
libsyntax_pos | ||
libterm | ||
libtest | ||
libunwind | ||
llvm@2a1cdeadd3 | ||
llvm-emscripten@2717444753 | ||
rtstartup | ||
rustc | ||
rustllvm | ||
stdsimd@05c2f61c38 | ||
test | ||
tools | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md | ||
stage0.txt |
This directory contains the source code of the rust project, including:
rustc
and its testslibstd
- Various submodules for tools, like rustdoc, rls, etc.
For more information on how various parts of the compiler work, see the rustc guide.
Their is also useful content in the following READMEs, which are gradually being moved over to the guide:
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/query
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
- https://github.com/rust-lang/rust/blob/master/src/librustc/infer/region_constraints
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve