about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2021-12-03 14:34:35 +0000
committerDavid Wood <david.wood@huawei.com>2022-01-06 09:32:42 +0000
commit7ecdc89436bb1aeac473030b250e87abd939c5fa (patch)
tree2fb00c728a1961aa8c8f9b091f5ac30f81daab52
parent2dc1a8a779f158ed070ccbde4529a97d178c0334 (diff)
downloadrust-7ecdc89436bb1aeac473030b250e87abd939c5fa.tar.gz
rust-7ecdc89436bb1aeac473030b250e87abd939c5fa.zip
Revert "bootstrap: copy `llvm-dwp` to sysroot"
This reverts commit 241160de72b5b55187ca54243e2a6e82e336d07c.
-rw-r--r--src/bootstrap/compile.rs7
-rw-r--r--src/bootstrap/dist.rs6
2 files changed, 1 insertions, 12 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index c0ab093f952..043b38ecece 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -1143,7 +1143,6 @@ impl Step for Assemble {
         let libdir = builder.sysroot_libdir(target_compiler, target_compiler.host);
         let libdir_bin = libdir.parent().unwrap().join("bin");
         t!(fs::create_dir_all(&libdir_bin));
-
         if let Some(lld_install) = lld_install {
             let src_exe = exe("lld", target_compiler.host);
             let dst_exe = exe("rust-lld", target_compiler.host);
@@ -1161,17 +1160,11 @@ impl Step for Assemble {
             }
         }
 
-        // Similarly, copy `llvm-dwp` into libdir for Split DWARF. Only copy it when the LLVM
-        // backend is used to avoid unnecessarily building LLVM and because LLVM is not checked
-        // out by default when the LLVM backend is not enabled.
         if builder.config.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) {
-            let src_exe = exe("llvm-dwp", target_compiler.host);
-            let dst_exe = exe("rust-llvm-dwp", target_compiler.host);
             let llvm_config_bin = builder.ensure(native::Llvm { target: target_compiler.host });
             if !builder.config.dry_run {
                 let llvm_bin_dir = output(Command::new(llvm_config_bin).arg("--bindir"));
                 let llvm_bin_dir = Path::new(llvm_bin_dir.trim());
-                builder.copy(&llvm_bin_dir.join(&src_exe), &libdir_bin.join(&dst_exe));
 
                 // Since we've already built the LLVM tools, install them to the sysroot.
                 // This is the equivalent of installing the `llvm-tools-preview` component via
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index dd179df3948..7d9b3da48ec 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -398,12 +398,12 @@ impl Step for Rustc {
             // component for now.
             maybe_install_llvm_runtime(builder, host, image);
 
-            let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
             let dst_dir = image.join("lib/rustlib").join(&*host.triple).join("bin");
             t!(fs::create_dir_all(&dst_dir));
 
             // Copy over lld if it's there
             if builder.config.lld_enabled {
+                let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
                 let rust_lld = exe("rust-lld", compiler.host);
                 builder.copy(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld));
                 // for `-Z gcc-ld=lld`
@@ -417,10 +417,6 @@ impl Step for Rustc {
                 }
             }
 
-            // Copy over llvm-dwp if it's there
-            let exe = exe("rust-llvm-dwp", compiler.host);
-            builder.copy(&src_dir.join(&exe), &dst_dir.join(&exe));
-
             // Man pages
             t!(fs::create_dir_all(image.join("share/man/man1")));
             let man_src = builder.src.join("src/doc/man");