Skip to content

Commit 35daf8b

Browse files
committed
Auto merge of #130620 - onur-ozkan:update-make-prepare, r=Kobzol
remove workaround for make prepare and use dry-run build instead Removes an annoying hard-coded logic. try-job: x86_64-msvc
2 parents 7042c26 + f6d3cd7 commit 35daf8b

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

src/bootstrap/mk/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ install:
9595
tidy:
9696
$(Q)$(BOOTSTRAP) test --stage 2 src/tools/tidy $(BOOTSTRAP_ARGS)
9797
prepare:
98-
$(Q)$(BOOTSTRAP) build --stage 2 nonexistent/path/to/trigger/cargo/metadata
98+
$(Q)$(BOOTSTRAP) build --stage 2 --dry-run
9999

100100
## MSVC native builders
101101

src/bootstrap/src/core/sanity.rs

+13-12
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,19 @@ than building it.
294294
}
295295
}
296296

297-
for host in &build.hosts {
298-
if !build.config.dry_run() {
297+
if !build.config.dry_run() {
298+
for host in &build.hosts {
299299
cmd_finder.must_have(build.cxx(*host).unwrap());
300-
}
301300

302-
if build.config.llvm_enabled(*host) {
303-
// Externally configured LLVM requires FileCheck to exist
304-
let filecheck = build.llvm_filecheck(build.build);
305-
if !filecheck.starts_with(&build.out)
306-
&& !filecheck.exists()
307-
&& build.config.codegen_tests
308-
{
309-
panic!("FileCheck executable {filecheck:?} does not exist");
301+
if build.config.llvm_enabled(*host) {
302+
// Externally configured LLVM requires FileCheck to exist
303+
let filecheck = build.llvm_filecheck(build.build);
304+
if !filecheck.starts_with(&build.out)
305+
&& !filecheck.exists()
306+
&& build.config.codegen_tests
307+
{
308+
panic!("FileCheck executable {filecheck:?} does not exist");
309+
}
310310
}
311311
}
312312
}
@@ -355,7 +355,8 @@ than building it.
355355
// There are three builds of cmake on windows: MSVC, MinGW, and
356356
// Cygwin. The Cygwin build does not have generators for Visual
357357
// Studio, so detect that here and error.
358-
let out = command("cmake").arg("--help").run_capture_stdout(build).stdout();
358+
let out =
359+
command("cmake").arg("--help").run_always().run_capture_stdout(build).stdout();
359360
if !out.contains("Visual Studio") {
360361
panic!(
361362
"

src/bootstrap/src/lib.rs

-9
Original file line numberDiff line numberDiff line change
@@ -596,15 +596,6 @@ impl Build {
596596
_ => (),
597597
}
598598

599-
{
600-
let builder = builder::Builder::new(self);
601-
if let Some(path) = builder.paths.first() {
602-
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
603-
return;
604-
}
605-
}
606-
}
607-
608599
if !self.config.dry_run() {
609600
{
610601
// We first do a dry-run. This is a sanity-check to ensure that

0 commit comments

Comments
 (0)