Skip to content

Enable building/disting standard library in stage 0#145876

Merged
bors merged 1 commit intorust-lang:masterfrom
Kobzol:dist-std-build
Aug 27, 2025
Merged

Enable building/disting standard library in stage 0#145876
bors merged 1 commit intorust-lang:masterfrom
Kobzol:dist-std-build

Conversation

@Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 26, 2025

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant 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.

Build stage 0 rust-std from rust-src with local rust Unable to build cross target's libstd on Rust 1.89

6 participants