Skip to content

Commit 10e5c7e

Browse files
authored
Unrolled build for rust-lang#130261
Rollup merge of rust-lang#130261 - onur-ozkan:rust-lang#130242, r=Kobzol skip target sanity check when it's a `local-rebuild` Running the stage0 target sanity check on the newly built compiler can result in errors and incorrect assumptions. Resolves rust-lang#130242
2 parents 5e84295 + 654513e commit 10e5c7e

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/bootstrap/src/core/sanity.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ than building it.
233233
}
234234

235235
// Ignore fake targets that are only used for unit tests in bootstrap.
236-
if cfg!(not(feature = "bootstrap-self-test")) && !skip_target_sanity {
236+
if cfg!(not(feature = "bootstrap-self-test")) && !skip_target_sanity && !build.local_rebuild
237+
{
237238
let mut has_target = false;
238239
let target_str = target.to_string();
239240

src/tools/opt-dist/src/tests.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ change-id = 115898
6767
[build]
6868
rustc = "{rustc}"
6969
cargo = "{cargo}"
70+
local-rebuild = true
7071
7172
[target.{host_triple}]
7273
llvm-config = "{llvm_config}"
@@ -102,13 +103,7 @@ llvm-config = "{llvm_config}"
102103
for test_path in env.skipped_tests() {
103104
args.extend(["--skip", test_path]);
104105
}
105-
cmd(&args)
106-
.env("COMPILETEST_FORCE_STAGE0", "1")
107-
// Above we override the stage 0 compiler with previously compiled compiler,
108-
// which can cause confusion in bootstrap's target sanity checks.
109-
.env("BOOTSTRAP_SKIP_TARGET_SANITY", "1")
110-
.run()
111-
.context("Cannot execute tests")
106+
cmd(&args).env("COMPILETEST_FORCE_STAGE0", "1").run().context("Cannot execute tests")
112107
}
113108

114109
/// Tries to find the version of the dist artifacts (either nightly, beta, or 1.XY.Z).

0 commit comments

Comments
 (0)