about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-11 18:38:28 +0200
committerGitHub <noreply@github.com>2023-06-11 18:38:28 +0200
commit733617bd16e35a26d048a089d2a927511f4a3097 (patch)
tree22cc2bcc47f13ee2b667f8ead18dcd1d07d0ce25
parent7b6093ee0805570d1af441673ebce409f8a14587 (diff)
parentab683901531a61a19a459b981d262372124756b2 (diff)
downloadrust-733617bd16e35a26d048a089d2a927511f4a3097.tar.gz
rust-733617bd16e35a26d048a089d2a927511f4a3097.zip
Rollup merge of #112487 - zwhiteley:improve-docs, r=Mark-Simulacrum
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).
-rw-r--r--src/bootstrap/defaults/config.tools.toml2
-rw-r--r--src/bootstrap/setup.rs8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/defaults/config.tools.toml b/src/bootstrap/defaults/config.tools.toml
index 6b6625342a6..79424f28d27 100644
--- a/src/bootstrap/defaults/config.tools.toml
+++ b/src/bootstrap/defaults/config.tools.toml
@@ -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]
diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs
index c604c63a4dd..e13f3f0bd5e 100644
--- a/src/bootstrap/setup.rs
+++ b/src/bootstrap/setup.rs
@@ -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);
 }