]> git.lizzy.rs Git - rust.git/commitdiff
Distribute both rust-lldb and rust-gdb everywhere except win-msvc
authorBrian Anderson <banderson@mozilla.com>
Fri, 8 Apr 2016 19:10:56 +0000 (19:10 +0000)
committerBrian Anderson <banderson@mozilla.com>
Fri, 6 May 2016 03:09:48 +0000 (03:09 +0000)
Both debuggers are viable in some capacity on all tier-1 platforms,
and people often ask for rust-lldb on Linux or rust-gdb on OS X.

mk/debuggers.mk
mk/main.mk
src/bootstrap/build/dist.rs

index aa7b62e13b86c77b76d8e3504a1e3c18641f9bbb..fbf32dc1a397f2468b10eecd1100394472c7eb50 100644 (file)
@@ -41,10 +41,13 @@ DEBUGGER_BIN_SCRIPTS_LLDB_ABS=\
 
 
 ## ALL ##
-DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB) \
-                                 $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB)
-DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
-                                     $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS)
+DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL=gdb_load_rust_pretty_printers.py \
+                                 gdb_rust_pretty_printing.py \
+                                 lldb_rust_formatters.py \
+                                 debugger_pretty_printers_common.py
+DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS=\
+    $(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL), \
+        $(CFG_SRC_DIR)src/etc/$(script))
 DEBUGGER_BIN_SCRIPTS_ALL=$(DEBUGGER_BIN_SCRIPTS_GDB) \
                          $(DEBUGGER_BIN_SCRIPTS_LLDB)
 DEBUGGER_BIN_SCRIPTS_ALL_ABS=$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) \
index 4d0cf94948f68e10c2310373e1b0b326ac77d1df..493b61051331f498776fd783a5113e6bf1f294a9 100644 (file)
@@ -390,7 +390,7 @@ endif
 # This 'function' will determine which debugger scripts to copy based on a
 # target triple. See debuggers.mk for more information.
 TRIPLE_TO_DEBUGGER_SCRIPT_SETTING=\
- $(if $(findstring windows,$(1)),none,$(if $(findstring darwin,$(1)),lldb,gdb))
+ $(if $(findstring windows-msvc,$(1)),none,all)
 
 STAGES = 0 1 2 3
 
index f2e3117fa9766f90cf26fde34423390d648f4d83..9e875ec44c23a04843cb53a9f3f0e5b1766d0609 100644 (file)
@@ -217,23 +217,23 @@ pub fn debugger_scripts(build: &Build,
         t!(fs::create_dir_all(&dst));
         install(&build.src.join("src/etc/").join(file), &dst, 0o644);
     };
-    if host.contains("windows") {
+    if host.contains("windows-msvc") {
         // no debugger scripts
-    } else if host.contains("darwin") {
-        // lldb debugger scripts
-        install(&build.src.join("src/etc/rust-lldb"), &sysroot.join("bin"),
-                0o755);
-
-        cp_debugger_script("lldb_rust_formatters.py");
-        cp_debugger_script("debugger_pretty_printers_common.py");
     } else {
+        cp_debugger_script("debugger_pretty_printers_common.py");
+
         // gdb debugger scripts
         install(&build.src.join("src/etc/rust-gdb"), &sysroot.join("bin"),
                 0o755);
 
         cp_debugger_script("gdb_load_rust_pretty_printers.py");
         cp_debugger_script("gdb_rust_pretty_printing.py");
-        cp_debugger_script("debugger_pretty_printers_common.py");
+
+        // lldb debugger scripts
+        install(&build.src.join("src/etc/rust-lldb"), &sysroot.join("bin"),
+                0o755);
+
+        cp_debugger_script("lldb_rust_formatters.py");
     }
 }