about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/llvm.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/llvm.rs b/src/bootstrap/llvm.rs
index ab7906d0383..19e595650cf 100644
--- a/src/bootstrap/llvm.rs
+++ b/src/bootstrap/llvm.rs
@@ -845,7 +845,8 @@ impl Step for Lld {
         // component installed, one can successfully invoke `rust-lld` directly without rustup's
         // `LD_LIBRARY_PATH` overrides)
         //
-        if builder.config.rust_rpath
+        if builder.config.rpath_enabled(target)
+            && util::use_host_linker(target)
             && builder.config.llvm_link_shared()
             && target.contains("linux")
         {