Skip to content

skip stage 0 target check if BOOTSTRAP_SKIP_TARGET_SANITY is set - #129651

Merged
bors merged 2 commits into
rust-lang:masterfrom
onur-ozkan:stage0-target-sanity-check
Aug 31, 2024
Merged

skip stage 0 target check if BOOTSTRAP_SKIP_TARGET_SANITY is set#129651
bors merged 2 commits into
rust-lang:masterfrom
onur-ozkan:stage0-target-sanity-check

Conversation

@onur-ozkan

@onur-ozkanonur-ozkan commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

When adding a new target to rustc and extending STAGE0_MISSING_TARGETS, there is a chance that in the merge CI bootstrap target sanity check might fail here because the stage 0 compiler will assume to already support the new target since opt-dist uses the previously compiled compiler as the stage 0 compiler.

This PR skips this check if BOOTSTRAP_SKIP_TARGET_SANITY is set, and makes opt-dist to set BOOTSTRAP_SKIP_TARGET_SANITY so bootstrap doesn't run this logic for opt-dist tests.

Fixes#127021 (comment).

Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1

Blocker for #127021

@rustbot

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 27, 2024
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/opt-dist

cc @Kobzol

@onur-ozkan
onur-ozkanforce-pushed the stage0-target-sanity-check branch 2 times, most recently from 828a127 to c2a85f7CompareAugust 27, 2024 08:07
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
onur-ozkanforce-pushed the stage0-target-sanity-check branch from 7373411 to 1a74371CompareAugust 27, 2024 09:14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
opt-dist overrides the stage 0 compiler with previously compiled compilers,
which can cause confusion in bootstrap's target sanity checks. It is best to
skip that check.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@Kobzol

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Aug 30, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 1a74371 has been approved by Kobzol

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 31, 2024
…eck, r=Kobzol
skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set
When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](https://github.com/rust-lang/rust/blob/26d27b7c8729fb61fe8321fcd2ce734a79aa695d/src/bootstrap/src/core/sanity.rs#L243-L256) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler.
This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests.
Fixesrust-lang#127021 (comment).
Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1
Blocker for rust-lang#127021
This was referenced Aug 31, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
…iaskrgr
Rollup of 11 pull requests
Successful merges:
- rust-lang#128523 (Add release notes for 1.81.0)
- rust-lang#129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen)
- rust-lang#129650 (Clean up `library/profiler_builtins/build.rs`)
- rust-lang#129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set)
- rust-lang#129684 (Enable Miri to pass pointers through FFI)
- rust-lang#129762 (Update the `wasm-component-ld` binary dependency)
- rust-lang#129782 (couple more crash tests)
- rust-lang#129816 (tidy: say which feature gate has a stability issue mismatch)
- rust-lang#129818 (make the const-unstable-in-stable error more clear)
- rust-lang#129824 (Fix code examples buttons not appearing on click on mobile)
- rust-lang#129826 (library: Fix typo in `core::mem`)
r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
…iaskrgr
Rollup of 11 pull requests
Successful merges:
- rust-lang#128523 (Add release notes for 1.81.0)
- rust-lang#129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen)
- rust-lang#129650 (Clean up `library/profiler_builtins/build.rs`)
- rust-lang#129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set)
- rust-lang#129684 (Enable Miri to pass pointers through FFI)
- rust-lang#129762 (Update the `wasm-component-ld` binary dependency)
- rust-lang#129782 (couple more crash tests)
- rust-lang#129816 (tidy: say which feature gate has a stability issue mismatch)
- rust-lang#129818 (make the const-unstable-in-stable error more clear)
- rust-lang#129824 (Fix code examples buttons not appearing on click on mobile)
- rust-lang#129826 (library: Fix typo in `core::mem`)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit e3795af into rust-lang:masterAug 31, 2024
@rustbotrustbot added this to the 1.82.0 milestone Aug 31, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
Rollup merge of rust-lang#129651 - onur-ozkan:stage0-target-sanity-check, r=Kobzol
skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set
When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](https://github.com/rust-lang/rust/blob/26d27b7c8729fb61fe8321fcd2ce734a79aa695d/src/bootstrap/src/core/sanity.rs#L243-L256) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler.
This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests.
Fixesrust-lang#127021 (comment).
Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1
Blocker for rust-lang#127021
@onur-ozkan
onur-ozkan deleted the stage0-target-sanity-check branch September 1, 2024 09:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@onur-ozkan@rustbot@rust-log-analyzer@Kobzol@bors@Mark-Simulacrum