about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/dist.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index c6ff63ad71b..92c0a088b5e 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -501,6 +501,13 @@ impl Step for Rustc {
             t!(fs::create_dir_all(&backends_dst));
             builder.cp_r(&backends_src, &backends_dst);
 
+            // Copy libLLVM.so to the lib dir as well, if needed. While not
+            // technically needed by rustc itself it's needed by lots of other
+            // components like the llvm tools and LLD. LLD is included below and
+            // tools/LLDB come later, so let's just throw it in the rustc
+            // component for now.
+            maybe_install_llvm_dylib(builder, host, image);
+
             // Copy over lld if it's there
             if builder.config.lld_enabled {
                 let exe = exe("rust-lld", &compiler.host);
@@ -1967,8 +1974,6 @@ impl Step for LlvmTools {
             builder.install(&exe, &dst_bindir, 0o755);
         }
 
-        maybe_install_llvm_dylib(builder, target, &image);
-
         // Prepare the overlay
         let overlay = tmp.join("llvm-tools-overlay");
         drop(fs::remove_dir_all(&overlay));
@@ -2087,9 +2092,6 @@ impl Step for Lldb {
             }
         }
 
-        // Copy libLLVM.so to the lib dir as well, if needed.
-        maybe_install_llvm_dylib(builder, target, &image);
-
         // Prepare the overlay
         let overlay = tmp.join("lldb-overlay");
         drop(fs::remove_dir_all(&overlay));