Skip to content

Commit 7e717e9

Browse files
committed
Auto merge of #84471 - jyn514:linkcheck-llvm, r=Mark-Simulacrum
Allow running `x.py test --stage 2 src/tools/linkchecker` with `download-rustc = true` Previously, the LD_LIBRARY_PATH for the linkchecker looked like `build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib`, because the linkchecker depends on the master copy of the standard library. This is true, but doesn't include the library path for the compiler libraries: ``` /home/joshua/src/rust/rust/build/x86_64-unknown-linux-gnu/stage1-tools-bin/error_index_generator: error while loading shared libraries: libLLVM-12-rust-1.53.0-nightly.so: cannot open shared object file: No such file or directory ``` That file is in `build/x86_64-unknown-linux-gnu/stage1/lib/libLLVM-12-rust-1.53.0-nightly.so`, which wasn't included in the dynamic path. This adds `build/x86_64-unknown-linux-gnu/stage1/lib` to the dynamic path for the linkchecker.
2 parents 4de7572 + 7d4c388 commit 7e717e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/tool.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ impl ErrorIndex {
392392
let compiler = builder.compiler(builder.top_stage.saturating_sub(1), builder.config.build);
393393
let mut cmd = Command::new(builder.ensure(ErrorIndex { compiler }));
394394
add_dylib_path(
395-
vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
395+
vec![
396+
PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host)),
397+
PathBuf::from(builder.rustc_libdir(compiler)),
398+
],
396399
&mut cmd,
397400
);
398401
cmd

0 commit comments

Comments
 (0)