Auto merge of #50012 - Zoxc:msvc-fix, r=Mark-Simulacrum

Don't look for cc/cxx when testing with bogus targets

This fixes test builds on Windows.

r? @Mark-Simulacrum
This commit is contained in:
bors 2018-04-17 01:41:43 +00:00
commit 94516c5038
1 changed files with 8 additions and 4 deletions

View 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.