From 52e1c847326364bef068faeb333cc3d1c9bae495 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20K=C3=A5re=20Alsaker?= Date: Tue, 17 Apr 2018 01:59:00 +0200 Subject: [PATCH] Don't look for cc/cxx when testing with bogus targets --- src/bootstrap/sanity.rs | 12 ++++++++---- 1 file 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. -- 2.44.0