about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-04-17 01:59:00 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2018-04-17 01:59:00 +0200
commit52e1c847326364bef068faeb333cc3d1c9bae495 (patch)
tree309a58553cf7888583e88a0c2160291cb2600f7c
parent49317cd511fbb60178bd5122e484609568938468 (diff)
downloadrust-52e1c847326364bef068faeb333cc3d1c9bae495.tar.gz
rust-52e1c847326364bef068faeb333cc3d1c9bae495.zip
Don't look for cc/cxx when testing with bogus targets
-rw-r--r--src/bootstrap/sanity.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index 1b1cec5f18c..c7f514da939 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -140,14 +140,18 @@ pub fn check(build: &mut Build) {
             continue;
         }
 
-        cmd_finder.must_have(build.cc(*target));
-        if let Some(ar) = build.ar(*target) {
-            cmd_finder.must_have(ar);
+        if !build.config.dry_run {
+            cmd_finder.must_have(build.cc(*target));
+            if let Some(ar) = build.ar(*target) {
+                cmd_finder.must_have(ar);
+            }
         }
     }
 
     for host in &build.hosts {
-        cmd_finder.must_have(build.cxx(*host).unwrap());
+        if !build.config.dry_run {
+            cmd_finder.must_have(build.cxx(*host).unwrap());
+        }
 
         // The msvc hosts don't use jemalloc, turn it off globally to
         // avoid packaging the dummy liballoc_jemalloc on that platform.