Skip to content

Commit

Permalink
Rollup merge of #112487 - zwhiteley:improve-docs, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Update documentation for `tools` defaults

This PR alters the information in the tools profile config to mention that `download-rustc` uses the stage2 toolchain and not the stage1 toolchain (see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Unable.20to.20compile.20rustc.20MSVC and rust-lang/rustc-dev-guide#1694).
  • Loading branch information
matthiaskrgr authored Jun 11, 2023
2 parents 7b6093e + ab68390 commit 733617b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap/defaults/config.tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ debug-logging = true
incremental = true
# Download rustc from CI instead of building it from source.
# This cuts compile times by almost 60x, but means you can't modify the compiler.
# Using these defaults will download the stage2 compiler (see `download-rustc`
# setting) and the stage2 toolchain should therefore be used for these defaults.
download-rustc = "if-unchanged"

[build]
Expand Down
8 changes: 8 additions & 0 deletions src/bootstrap/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ pub fn setup(config: &Config, profile: Profile) {
);
}

if profile == Profile::Tools {
eprintln!();
eprintln!(
"note: the `tools` profile sets up the `stage2` toolchain (use \
`rustup toolchain link 'name' host/build/stage2` to use rustc)"
)
}

let path = &config.config.clone().unwrap_or(PathBuf::from("config.toml"));
setup_config_toml(path, profile, config);
}
Expand Down

0 comments on commit 733617b

Please sign in to comment.