You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are reworking how the stage 0 bootstrap sequence works (the sequence used to build a stage 1 compiler).
16
16
17
-
- Before: a stage 0 (possibly beta) compiler is used to build the in-tree std, which in turn is used to build the stage 1 compiler.
18
-
- After: a stage 0 (possibly beta) compiler and a precompiled stage 0 std is instead used to build the stage 1 compiler.
17
+
- Before: a stage 0 (beta by default) compiler is used to build the in-tree std, which in turn is used to build the stage 1 compiler.
18
+
- After: a stage 0 (beta by default) compiler and a precompiled stage 0 std is instead used to build the stage 1 compiler.
19
19
20
-
Notably, this means:
20
+

21
+
22
+
Notably, this means that after [redesign stage 0 std #119899](https://github.com/rust-lang/rust/pull/119899) PR lands:
21
23
22
24
-`./x {build,test,check} library --stage 0` becomes no-op, as stage 0 std is no longer the built in-tree std, and the minimum supported stage to build std is now `1`.
23
25
- Consequently, default (test, check, bench) stage values in the library profile are no longer `0`, but instead defaults to `1`.
24
-
-`cfg(bootstrap)` is no longer needed for library development. In (very) rare cases, `cfg(bootstrap)` may be needed in the compiler for dogfooding unstable library features.
26
+
-Some additional `cfg(bootstrap)`usages may be needed in the compiler sources for dogfooding unstable library features.
25
27
26
28
## Motivation
27
29
28
-
The previous stage 0 bootstrapping sequence was a source of endless confusion for compiler, library and bootstrap contributors alike, because std had to support being built by *both* a previous possibly-beta rustc and in-tree rustc, with `cfg(bootstrap)` in std sources necessary to distinguish between them. By adjusting the stage 0 bootstrap sequence to instead use a precompiled stage 0 std instead of building the in-tree std, we hope to (1) simplify library development workflow to no longer need `cfg(bootstrap)` and (2) enable simplifying some bootstrap logic related to building in-tree std in stage 0.
30
+
The previous stage 0 bootstrapping sequence was a source of endless confusion for compiler, library and bootstrap contributors alike, because std had to support being built by *both* a previous beta rustc and in-tree rustc, with `cfg(bootstrap)` in std sources necessary to distinguish between them. By adjusting the stage 0 bootstrap sequence to instead use a precompiled stage 0 std instead of building the in-tree std, we hope to (1) simplify library development workflow to no longer need `cfg(bootstrap)` and (2) enable simplifying some bootstrap logic related to building in-tree std in stage 0.
29
31
30
32
This was [originally proposed by @jyn514 in the MCP rust-lang/compiler-team#619](https://github.com/rust-lang/compiler-team/issues/619).
31
33
@@ -41,7 +43,7 @@ See the *Recommended config: have `compiletest` instead depend on precompiled st
41
43
42
44
## What does this mean for a typical compiler workflow?
43
45
44
-
- If unstable library features are being dogfooded, in rare cases `cfg(bootstrap)` may now be needed in compiler sources.
46
+
- If unstable library features are being dogfooded, some additional `cfg(bootstrap)` usages may now be needed in compiler sources.
0 commit comments