Skip to content

Commit 9abd018

Browse files
committed
support rust.channel = "ci"
1 parent 3b022d8 commit 9abd018

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

config.example.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,12 @@
608608

609609
# The "channel" for the Rust build to produce. The stable/beta channels only
610610
# allow using stable features, whereas the nightly and dev channels allow using
611-
# nightly features
611+
# nightly features.
612612
#
613-
# If using tarball sources, default value for `channel` is taken from the `src/ci/channel` file;
614-
# otherwise, it's "dev".
615-
#channel = if "is a tarball source" { content of `src/ci/channel` file } else { "dev" }
613+
# You can set the channel to "ci" to load the channel name from `src/ci/channel`.
614+
#
615+
# If using tarball sources, default value is "ci", otherwise, it's "dev".
616+
#channel = if "is a tarball source" { "ci" } else { "dev" }
616617

617618
# A descriptive string to be appended to `rustc --version` output, which is
618619
# also used in places like debuginfo `DW_AT_producer`. This may be useful for

src/bootstrap/src/core/config/config.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,11 @@ impl Config {
17751775

17761776
let is_user_configured_rust_channel =
17771777
if let Some(channel) = toml.rust.as_ref().and_then(|r| r.channel.clone()) {
1778-
config.channel = channel;
1778+
if channel == "ci" {
1779+
config.channel = ci_channel.into();
1780+
} else {
1781+
config.channel = channel;
1782+
}
17791783
true
17801784
} else {
17811785
false

0 commit comments

Comments
 (0)