Skip to content

Commit 7fa6fa4

Browse files
Rollup merge of rust-lang#122330 - tshepang:patch-1, r=clubby789
bootstrap readme: fix, improve, update
2 parents 9aca5c0 + 816dc96 commit 7fa6fa4

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/bootstrap/README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# rustbuild - Bootstrapping Rust
22

3-
This README is aimed at helping to explain how Rust is bootstrapped and in general,
4-
some of the technical details of the build system.
3+
This README is aimed at helping to explain how Rust is bootstrapped,
4+
and some of the technical details of the build system.
55

66
Note that this README only covers internal information, not how to use the tool.
77
Please check [bootstrapping dev guide][bootstrapping-dev-guide] for further information.
@@ -10,12 +10,12 @@ Please check [bootstrapping dev guide][bootstrapping-dev-guide] for further info
1010

1111
## Introduction
1212

13-
The build system defers most of the complicated logic managing invocations
13+
The build system defers most of the complicated logic of managing invocations
1414
of rustc and rustdoc to Cargo itself. However, moving through various stages
1515
and copying artifacts is still necessary for it to do. Each time rustbuild
1616
is invoked, it will iterate through the list of predefined steps and execute
1717
each serially in turn if it matches the paths passed or is a default rule.
18-
For each step rustbuild relies on the step internally being incremental and
18+
For each step, rustbuild relies on the step internally being incremental and
1919
parallel. Note, though, that the `-j` parameter to rustbuild gets forwarded
2020
to appropriate test harnesses and such.
2121

@@ -24,7 +24,7 @@ to appropriate test harnesses and such.
2424
The rustbuild build system goes through a few phases to actually build the
2525
compiler. What actually happens when you invoke rustbuild is:
2626

27-
1. The entry point script(`x` for unix like systems, `x.ps1` for windows systems,
27+
1. The entry point script (`x` for unix like systems, `x.ps1` for windows systems,
2828
`x.py` cross-platform) is run. This script is responsible for downloading the stage0
2929
compiler/Cargo binaries, and it then compiles the build system itself (this folder).
3030
Finally, it then invokes the actual `bootstrap` binary build system.
@@ -107,12 +107,13 @@ build/
107107

108108
# Location where the stage0 Cargo and Rust compiler are unpacked. This
109109
# directory is purely an extracted and overlaid tarball of these two (done
110-
# by the bootstrap python script). In theory, the build system does not
110+
# by the bootstrap Python script). In theory, the build system does not
111111
# modify anything under this directory afterwards.
112112
stage0/
113113

114114
# These to-build directories are the cargo output directories for builds of
115-
# the standard library and compiler, respectively. Internally, these may also
115+
# the standard library, the test system, the compiler, and various tools,
116+
# respectively. Internally, these may also
116117
# have other target directories, which represent artifacts being compiled
117118
# from the host to the specified target.
118119
#
@@ -169,17 +170,17 @@ read by the other.
169170

170171
Some general areas that you may be interested in modifying are:
171172

172-
* Adding a new build tool? Take a look at `bootstrap/tool.rs` for examples of
173-
other tools.
173+
* Adding a new build tool? Take a look at `bootstrap/src/core/build_steps/tool.rs`
174+
for examples of other tools.
174175
* Adding a new compiler crate? Look no further! Adding crates can be done by
175-
adding a new directory with `Cargo.toml` followed by configuring all
176+
adding a new directory with `Cargo.toml`, followed by configuring all
176177
`Cargo.toml` files accordingly.
177178
* Adding a new dependency from crates.io? This should just work inside the
178179
compiler artifacts stage (everything other than libtest and libstd).
179-
* Adding a new configuration option? You'll want to modify `bootstrap/flags.rs`
180-
for command line flags and then `bootstrap/config.rs` to copy the flags to the
180+
* Adding a new configuration option? You'll want to modify `bootstrap/src/core/config/flags.rs`
181+
for command line flags and then `bootstrap/src/core/config/config.rs` to copy the flags to the
181182
`Config` struct.
182-
* Adding a sanity check? Take a look at `bootstrap/sanity.rs`.
183+
* Adding a sanity check? Take a look at `bootstrap/src/core/sanity.rs`.
183184

184185
If you make a major change on bootstrap configuration, please remember to:
185186

0 commit comments

Comments
 (0)