Skip to content

Commit ab68390

Browse files
committed
Improve documentation for tools profile
Make the build process more beginner friendly: - Include information explaining that the stage2 toolchain should be used (and not the stage1 toolchain) due to the `download-rustc` setting. - Display a message when the user runs `x setup tools` explaining that they should use the stage2 toolchain.
1 parent 788c98d commit ab68390

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/bootstrap/defaults/config.tools.toml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ debug-logging = true
99
incremental = true
1010
# Download rustc from CI instead of building it from source.
1111
# This cuts compile times by almost 60x, but means you can't modify the compiler.
12+
# Using these defaults will download the stage2 compiler (see `download-rustc`
13+
# setting) and the stage2 toolchain should therefore be used for these defaults.
1214
download-rustc = "if-unchanged"
1315

1416
[build]

src/bootstrap/setup.rs

+8
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ pub fn setup(config: &Config, profile: Profile) {
176176
);
177177
}
178178

179+
if profile == Profile::Tools {
180+
eprintln!();
181+
eprintln!(
182+
"note: the `tools` profile sets up the `stage2` toolchain (use \
183+
`rustup toolchain link 'name' host/build/stage2` to use rustc)"
184+
)
185+
}
186+
179187
let path = &config.config.clone().unwrap_or(PathBuf::from("config.toml"));
180188
setup_config_toml(path, profile, config);
181189
}

0 commit comments

Comments
 (0)