diff options
| author | bors <bors@rust-lang.org> | 2025-07-11 01:06:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-11 01:06:04 +0000 |
| commit | cdac44e608c3df9a241e0a1b53b3f62af250dbf1 (patch) | |
| tree | f7e355279b7866227d1019dec44e56752e73cad5 /src/bootstrap | |
| parent | 2a023bf80a6fbd6a06d5460a34eb247b986286ed (diff) | |
| parent | 3a1bb04166b58762d8d9a1a7d1f5a24a938891f6 (diff) | |
Auto merge of #143762 - tgross35:rollup-n9t27c6, r=tgross35
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140136 (Add an aarch64-msvc build running on ARM64 Windows) - rust-lang/rust#143642 (stdarch subtree update) - rust-lang/rust#143707 (Fix `--skip-std-check-if-no-download-rustc`) - rust-lang/rust#143722 (Make some "safe" llvm ops actually sound) - rust-lang/rust#143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`) - rust-lang/rust#143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`) - rust-lang/rust#143744 (Properly track the depth when expanding free alias types) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/check.rs | 14 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 24 |
2 files changed, 31 insertions, 7 deletions
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 0497bae86a1..0cc4628310a 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -47,6 +47,13 @@ impl Step for Std { } fn make_run(run: RunConfig<'_>) { + if !run.builder.download_rustc() && run.builder.config.skip_std_check_if_no_download_rustc { + eprintln!( + "WARNING: `--skip-std-check-if-no-download-rustc` flag was passed and `rust.download-rustc` is not available. Skipping." + ); + return; + } + let crates = std_crates_for_run_make(&run); run.builder.ensure(Std { build_compiler: prepare_compiler_for_check(run.builder, run.target, Mode::Std), @@ -56,13 +63,6 @@ impl Step for Std { } fn run(self, builder: &Builder<'_>) { - if !builder.download_rustc() && builder.config.skip_std_check_if_no_download_rustc { - eprintln!( - "WARNING: `--skip-std-check-if-no-download-rustc` flag was passed and `rust.download-rustc` is not available. Skipping." - ); - return; - } - let build_compiler = self.build_compiler; let stage = build_compiler.stage; let target = self.target; diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 68d1885b0a7..51a90649692 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1439,6 +1439,30 @@ mod snapshot { "); } + /// Make sure that we don't check library when download-rustc is disabled + /// when `--skip-std-check-if-no-download-rustc` was passed. + #[test] + fn check_library_skip_without_download_rustc() { + let ctx = TestCtx::new(); + let args = ["--set", "rust.download-rustc=false", "--skip-std-check-if-no-download-rustc"]; + insta::assert_snapshot!( + ctx.config("check") + .paths(&["library"]) + .args(&args) + .render_steps(), @""); + + insta::assert_snapshot!( + ctx.config("check") + .paths(&["library", "compiler"]) + .args(&args) + .render_steps(), @r" + [build] llvm <host> + [check] rustc 0 <host> -> rustc 1 <host> + [check] rustc 0 <host> -> cranelift 1 <host> + [check] rustc 0 <host> -> gcc 1 <host> + "); + } + #[test] fn check_miri_no_explicit_stage() { let ctx = TestCtx::new(); |
