Enable building/disting standard library in stage 0#145876
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 27, 2025
Merged
Enable building/disting standard library in stage 0#145876bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the stage0 redesign, building a stage0 library no longer is a thing, because the stage0 compiler normally cannot build libstd anymore. However, there are valid use-cases for having the ability to quickly cross-compile libstd for different targets, when the stage0 compiler is e.g. a stable released version, and you want to cross-compile libstd from the same sources of that compiler.
This PR allows that, as long as you set
build.local-rebuild = true, which promises bootstrap that the stage0 compiler actually comes from in-tree sources, and can thus compile libstd.The change needed to enable this is very minimal, so I think that it is worth it to allow this use-case to work.
Fixes: #145587
Fixes: #145859
Related issue: #94781
r? @jieyouxu