Skip to content

Conversation

@jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jan 9, 2026

After the stage0 rework, our bootstrap chain is moreso the flat

precompiled                     in-tree
(stage0 rustc => stage0 std) => (stage1 rustc => stage1 std)

(where => here means "builds" or "is used to build")

as opposed to the chain previously

precompiled     in-tree (`cfg(bootstrap)`)             in-tree (`cfg(not(bootstrap))`)
stage0 rustc => stage0 std                          => (stage1 rustc => stage1 std)

so these library dances should no longer be needed, as we always build in-tree library with in-tree compiler, and the in-tree compiler will know about the new target.

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2026

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jan 9, 2026
@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 9, 2026

cc @fee1-dead

@fee1-dead
Copy link
Member

I will want to investigate whether the infra around STAGE0_MISSING_TARGETS is actually needed...

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 9, 2026

I will want to investigate whether the infra around STAGE0_MISSING_TARGETS is actually needed...

For bootstrap it's a sanity check, since in parts of bootstrap we unfortunately have to make assumptions based on the existing target set (so other parts of the build system / test infra don't have to).

Ideally, the target specs would be moreso "pure definitions" that can be shared between bootstrap/test infra/compiler/library, but you know, it's a lot of work (design/impl wise). And ideally, you'd have "structured target spec query APIs" like being able to know which plausible target archs there are, etc. etc. (Custom targets throw a spanner in the works there.)

@jieyouxu jieyouxu merged commit ccc7bdd into rust-lang:main Jan 9, 2026
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jan 9, 2026
@jieyouxu jieyouxu deleted the fix-stage0 branch January 9, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants