diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index b8d83c765f71..dfb327c48e56 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2326,6 +2326,10 @@ impl Step for LlvmTools { builder.install(&exe, &dst_bindir, 0o755); } + // Copy libLLVM.so to the target lib dir as well, + // so the RPATH like `$ORIGIN/../lib` can find it. + maybe_install_llvm_target(builder, target, &image); + // Prepare the overlay let overlay = tmp.join("llvm-tools-overlay"); drop(fs::remove_dir_all(&overlay));