Skip to content

Commit

Permalink
support rust.channel = "ci"
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Feb 18, 2025
1 parent 3b022d8 commit 9abd018
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,12 @@

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

# A descriptive string to be appended to `rustc --version` output, which is
# also used in places like debuginfo `DW_AT_producer`. This may be useful for
Expand Down
6 changes: 5 additions & 1 deletion src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,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 == "ci" {
config.channel = ci_channel.into();
} else {
config.channel = channel;
}
true
} else {
false
Expand Down

0 comments on commit 9abd018

Please sign in to comment.