about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-04-23 00:25:39 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-04-23 00:33:21 -0400
commit7d4c3889d4e11bdc2e204be2fd4f7c136f8c0f1a (patch)
tree16490635944e4ddee557934ac422c4aa5d2d1714
parent7f4afdf0255600306bf67432da722c7b5d2cbf82 (diff)
downloadrust-7d4c3889d4e11bdc2e204be2fd4f7c136f8c0f1a.tar.gz
rust-7d4c3889d4e11bdc2e204be2fd4f7c136f8c0f1a.zip
Allow running `x.py test src/test/linkchecker` with `download-llvm = 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.
-rw-r--r--src/bootstrap/tool.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index e85f4628fb0..4f2426648fd 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -392,7 +392,10 @@ impl ErrorIndex {
         let compiler = builder.compiler(builder.top_stage.saturating_sub(1), builder.config.build);
         let mut cmd = Command::new(builder.ensure(ErrorIndex { compiler }));
         add_dylib_path(
-            vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
+            vec![
+                PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host)),
+                PathBuf::from(builder.rustc_libdir(compiler)),
+            ],
             &mut cmd,
         );
         cmd