about summary refs log tree commit diff
path: root/src/bootstrap/build
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-04-19 09:44:19 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-04-19 09:57:00 -0700
commitcbe6292c58feb643917c0959f95173a3c312fbd4 (patch)
tree7cbc1d60e2ae6fd48b65025aebc5a2e1034ca5bf /src/bootstrap/build
parent9db6a41687bacde82585f127b43d418d5845e5c7 (diff)
downloadrust-cbe6292c58feb643917c0959f95173a3c312fbd4.tar.gz
rust-cbe6292c58feb643917c0959f95173a3c312fbd4.zip
mk: Force system python for LLDB tests on OSX
Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it
looks like no other Python will work.
Diffstat (limited to 'src/bootstrap/build')
-rw-r--r--src/bootstrap/build/check.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/bootstrap/build/check.rs b/src/bootstrap/build/check.rs
index f145a7149fb..ec97ebcc832 100644
--- a/src/bootstrap/build/check.rs
+++ b/src/bootstrap/build/check.rs
@@ -81,8 +81,19 @@ pub fn compiletest(build: &Build,
 
     // FIXME: needs android support
     cmd.arg("--android-cross-path").arg("");
+
     // FIXME: CFG_PYTHON should probably be detected more robustly elsewhere
-    cmd.arg("--python").arg("python");
+    let python_default = "python";
+    cmd.arg("--docck-python").arg(python_default);
+
+    if build.config.build.ends_with("apple-darwin") {
+        // Force /usr/bin/python on OSX for LLDB tests because we're loading the
+        // LLDB plugin's compiled module which only works with the system python
+        // (namely not Homebrew-installed python)
+        cmd.arg("--lldb-python").arg("/usr/bin/python");
+    } else {
+        cmd.arg("--lldb-python").arg(python_default);
+    }
 
     if let Some(ref vers) = build.gdb_version {
         cmd.arg("--gdb-version").arg(vers);