about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-09-05 13:05:46 -0600
committerTom Tromey <tom@tromey.com>2018-09-07 09:13:47 -0600
commit8aae6ca44a1bea64e2be3f2ce5a4581bb65d43ef (patch)
treeb93cad0355aa897267c1abbe30589986c0777826 /src/bootstrap
parent7366752a6164dd8e004f32c1a40f0e04a61bcbb2 (diff)
downloadrust-8aae6ca44a1bea64e2be3f2ce5a4581bb65d43ef.tar.gz
rust-8aae6ca44a1bea64e2be3f2ce5a4581bb65d43ef.zip
Have rust-lldb look for the rust-enabled lldb
We're shipping a rust-enabled lldb, but the "lldb" executable is not
installed into the "bin" directory by rustup.  See the discussion in
https://github.com/rust-lang-nursery/rustup.rs/pull/1492 for
background on this decision.  There, we agreed to have rust-lldb
prefer the rust-enabled lldb if it is installed.

This patch changes dist.rs to put lldb into rustlib, following what
was done for the other LLVM tools in #53955, and then fixes rust-lldb
to prefer that lldb, if it exists.

See issue #48168
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/dist.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 167e4a78eda..2d94704fda7 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -2056,7 +2056,8 @@ impl Step for Lldb {
         drop(fs::remove_dir_all(&image));
 
         // Prepare the image directory
-        let dst = image.join("bin");
+        let root = image.join("lib/rustlib").join(&*target);
+        let dst = root.join("bin");
         t!(fs::create_dir_all(&dst));
         for program in &["lldb", "lldb-argdumper", "lldb-mi", "lldb-server"] {
             let exe = bindir.join(exe(program, &target));
@@ -2065,7 +2066,7 @@ impl Step for Lldb {
 
         // The libraries.
         let libdir = builder.llvm_out(target).join("lib");
-        let dst = image.join("lib");
+        let dst = root.join("lib");
         t!(fs::create_dir_all(&dst));
         for entry in t!(fs::read_dir(&libdir)) {
             let entry = entry.unwrap();
@@ -2093,7 +2094,7 @@ impl Step for Lldb {
             let entry = t!(entry);
             if let Ok(name) = entry.file_name().into_string() {
                 if name.starts_with("python") {
-                    let dst = image.join(libdir_name)
+                    let dst = root.join(libdir_name)
                         .join(entry.file_name());
                     t!(fs::create_dir_all(&dst));
                     builder.cp_r(&entry.path(), &dst);