]> git.lizzy.rs Git - rust.git/commitdiff
Don't look for cc/cxx when testing with bogus targets
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Mon, 16 Apr 2018 23:59:00 +0000 (01:59 +0200)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Mon, 16 Apr 2018 23:59:00 +0000 (01:59 +0200)
src/bootstrap/sanity.rs

index 1b1cec5f18c07d530795f35ee5df4d4faa8145e8..c7f514da939a60639b7082ed5a8b7b64a2a80f0f 100644 (file)
@@ -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.