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
Collaborator
|
This PR modifies If appropriate, please update |
Member
|
This unfortunately has a merge conflict. I'll review this tmrw. |
jieyouxu
approved these changes
Aug 26, 2025
Member
|
@rustbot author |
Collaborator
|
☔ The latest upstream changes (presumably #145871) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Member
Author
|
@bors r=jieyouxu |
Collaborator
bors
added a commit
that referenced
this pull request
Aug 26, 2025
Rollup of 9 pull requests Successful merges: - #144499 (ci: Begin running ui tests with `rust.debuginfo-level-tests=1`) - #145790 (Improve dist for gnullvm hosts) - #145792 (Use attribute name in message for "outer attr used as inner attr" errors) - #145840 (rustc_codegen_ssa: More comprehensive RISC-V ELF flags) - #145876 (Enable building/disting standard library in stage 0) - #145887 (bootstrap: Don't panic if codegen-backends is set to empty) - #145888 (platform-support: Fix LoongArch32 host column) - #145892 (add a flag to codegen fn attrs for foreign items) - #145901 (Fix typo in comment of library/alloc/src/raw_vec/mod.rs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Aug 27, 2025
Rollup merge of #145876 - Kobzol:dist-std-build, r=jieyouxu Enable building/disting standard library in stage 0 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`
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 27, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144499 (ci: Begin running ui tests with `rust.debuginfo-level-tests=1`) - rust-lang/rust#145790 (Improve dist for gnullvm hosts) - rust-lang/rust#145792 (Use attribute name in message for "outer attr used as inner attr" errors) - rust-lang/rust#145840 (rustc_codegen_ssa: More comprehensive RISC-V ELF flags) - rust-lang/rust#145876 (Enable building/disting standard library in stage 0) - rust-lang/rust#145887 (bootstrap: Don't panic if codegen-backends is set to empty) - rust-lang/rust#145888 (platform-support: Fix LoongArch32 host column) - rust-lang/rust#145892 (add a flag to codegen fn attrs for foreign items) - rust-lang/rust#145901 (Fix typo in comment of library/alloc/src/raw_vec/mod.rs) r? `@ghost` `@rustbot` modify labels: rollup
OctopusET
added a commit
to OctopusET/rust
that referenced
this pull request
Sep 12, 2025
Reference: rust-lang#145876 Disabled from here: rust-lang@52882f6
4 tasks
|
I made a patch for 1.89.0 |
|
Will this be included in 1.90.0 too? |
Member
Author
|
No, it will be in 1.91.0. |
OctopusET
added a commit
to OctopusET/gentoo
that referenced
this pull request
Sep 12, 2025
Rust changed bootstrap design since version 1.89.0, and it doesn't build stage0 stdlib anymore: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/ This upstream PR will fix the issue: rust-lang/rust#145876 Closes: https://bugs.gentoo.org/962786 Signed-off-by: Sungjoon Moon <sumoon@seoulsaram.org>
OctopusET
added a commit
to OctopusET/gentoo
that referenced
this pull request
Sep 12, 2025
Rust changed bootstrap design since version 1.89.0, and it doesn't build stage0 stdlib anymore: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/ This upstream PR will fix the issue from 1.91.0: rust-lang/rust#145876 Closes: https://bugs.gentoo.org/962786 Signed-off-by: Sungjoon Moon <sumoon@seoulsaram.org>
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Sep 14, 2025
Rust changed bootstrap design since version 1.89.0, and it doesn't build stage0 stdlib anymore: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/ This upstream PR will fix the issue from 1.91.0: rust-lang/rust#145876 Closes: https://bugs.gentoo.org/962786 Signed-off-by: Sungjoon Moon <sumoon@seoulsaram.org> Part-of: #43765 Closes: #43765 Signed-off-by: Sam James <sam@gentoo.org>
Kobzol
pushed a commit
to Kobzol/rustc_codegen_gcc
that referenced
this pull request
Dec 21, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144499 (ci: Begin running ui tests with `rust.debuginfo-level-tests=1`) - rust-lang/rust#145790 (Improve dist for gnullvm hosts) - rust-lang/rust#145792 (Use attribute name in message for "outer attr used as inner attr" errors) - rust-lang/rust#145840 (rustc_codegen_ssa: More comprehensive RISC-V ELF flags) - rust-lang/rust#145876 (Enable building/disting standard library in stage 0) - rust-lang/rust#145887 (bootstrap: Don't panic if codegen-backends is set to empty) - rust-lang/rust#145888 (platform-support: Fix LoongArch32 host column) - rust-lang/rust#145892 (add a flag to codegen fn attrs for foreign items) - rust-lang/rust#145901 (Fix typo in comment of library/alloc/src/raw_vec/mod.rs) r? `@ghost` `@rustbot` modify labels: rollup
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Feb 2, 2026
See rust-lang/rust#145876 Closes: https://bugs.gentoo.org/966384 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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