Skip to content

Commit 94516c5

Browse files
committed
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
2 parents 3809bbf + 52e1c84 commit 94516c5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/bootstrap/sanity.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,18 @@ pub fn check(build: &mut Build) {
140140
continue;
141141
}
142142

143-
cmd_finder.must_have(build.cc(*target));
144-
if let Some(ar) = build.ar(*target) {
145-
cmd_finder.must_have(ar);
143+
if !build.config.dry_run {
144+
cmd_finder.must_have(build.cc(*target));
145+
if let Some(ar) = build.ar(*target) {
146+
cmd_finder.must_have(ar);
147+
}
146148
}
147149
}
148150

149151
for host in &build.hosts {
150-
cmd_finder.must_have(build.cxx(*host).unwrap());
152+
if !build.config.dry_run {
153+
cmd_finder.must_have(build.cxx(*host).unwrap());
154+
}
151155

152156
// The msvc hosts don't use jemalloc, turn it off globally to
153157
// avoid packaging the dummy liballoc_jemalloc on that platform.

0 commit comments

Comments
 (0)