about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-04-17 17:24:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-04-24 08:08:40 -0700
commit009f45f8f1fcc0d0a6700fec8e0fd64d5aa739d2 (patch)
treeabc4626ede154916ba1690697f94e1b61dc0d462 /src/bootstrap/lib.rs
parent846891aeff1a2a73524c404c6eeff5e8daf4caa2 (diff)
downloadrust-009f45f8f1fcc0d0a6700fec8e0fd64d5aa739d2.tar.gz
rust-009f45f8f1fcc0d0a6700fec8e0fd64d5aa739d2.zip
Run tests for the cargo submodule in tree
Previously the `cargotest` suite would run some arbitrary revision of Cargo's
test suite, but now that we're bundling it in tree we should be running the
Cargo submodule's test suite instead.
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 5e046f41673..5f518ea5602 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -557,6 +557,19 @@ impl Build {
             cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
         }
 
+        // When being built Cargo will at some point call `nmake.exe` on Windows
+        // MSVC. Unfortunately `nmake` will read these two environment variables
+        // below and try to intepret them. We're likely being run, however, from
+        // MSYS `make` which uses the same variables.
+        //
+        // As a result, to prevent confusion and errors, we remove these
+        // variables from our environment to prevent passing MSYS make flags to
+        // nmake, causing it to blow up.
+        if cfg!(target_env = "msvc") {
+            cargo.env_remove("MAKE");
+            cargo.env_remove("MAKEFLAGS");
+        }
+
         // Environment variables *required* needed throughout the build
         //
         // FIXME: should update code to not require this env var