about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2025-02-18 15:05:22 +0100
committerPietro Albini <pietro.albini@ferrous-systems.com>2025-02-28 11:02:22 +0100
commit1ccff0e01a8dd25623b535bc80b4d5d791e8f62d (patch)
tree0b754b2c0ad92b77f3989ad13797f045bd4541d9 /src/bootstrap
parentcb08599451226d780b2490f1aa9b414fe9e36657 (diff)
downloadrust-1ccff0e01a8dd25623b535bc80b4d5d791e8f62d.tar.gz
rust-1ccff0e01a8dd25623b535bc80b4d5d791e8f62d.zip
support rust.channel = "auto-detect"
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/config/config.rs6
-rw-r--r--src/bootstrap/src/utils/change_tracker.rs5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 2be42f16e2a..d0e0ed50ad8 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -1777,7 +1777,11 @@ impl Config {
 
         let is_user_configured_rust_channel =
             if let Some(channel) = toml.rust.as_ref().and_then(|r| r.channel.clone()) {
-                config.channel = channel;
+                if channel == "auto-detect" {
+                    config.channel = ci_channel.into();
+                } else {
+                    config.channel = channel;
+                }
                 true
             } else {
                 false
diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs
index 8dfe0d3a35e..5f49c50c5ad 100644
--- a/src/bootstrap/src/utils/change_tracker.rs
+++ b/src/bootstrap/src/utils/change_tracker.rs
@@ -360,4 +360,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
         severity: ChangeSeverity::Info,
         summary: "Added `build.test-stage = 2` to 'tools' profile defaults",
     },
+    ChangeInfo {
+        change_id: 137220,
+        severity: ChangeSeverity::Info,
+        summary: "`rust.channel` now supports \"auto-detect\" to load the channel from `src/ci/channel`",
+    },
 ];