Skip to content

Commit f9a4006

Browse files
committed
Auto merge of rust-lang#130261 - onur-ozkan:rust-lang#130242, r=<try>
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 try-job: dist-x86_64-linux
2 parents 394c406 + 98e3406 commit f9a4006

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
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/ci/github-actions/jobs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ envs:
6868
# - not running `opt-dist`'s post-optimization smoke tests on the resulting toolchain
6969
#
7070
# If you *want* these to happen however, temporarily uncomment it before triggering a try build.
71-
DIST_TRY_BUILD: 1
71+
# DIST_TRY_BUILD: 1
7272

7373
auto:
7474
<<: *production

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)