Skip to content

Commit afc7c65

Browse files
committed
Mention RalfJung's view of stages
1 parent e4d68e8 commit afc7c65

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/building/bootstrapping.md

+9
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ If this used `run-stage` instead, you'd need `x.py build --stage 1` to build
117117
a regular program, but `x.py build --stage 2 src/librustc_driver` to build a
118118
custom driver.
119119

120+
### Are there other ways to think about stages?
121+
122+
Yes! The above explanation focuses on what `rustc` is being _referred_ to -
123+
it describes `build --stage 1 src/rustc` as `build-stage` 1 and `run-stage 2`.
124+
However, another way to think about it is that `--stage 1` refers to
125+
the compiler _being run_, so `build --stage 1 src/rustc` means to _run_
126+
`stage1/rustc` on the `src/rustc` crate. This can be slightly more confusing
127+
at first, but leads to a more consistent view of 'stage'.
128+
120129
## Complications of bootstrapping
121130

122131
Since the build system uses the current beta compiler to build the stage-1

0 commit comments

Comments
 (0)