mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
handle channel info before handling git info
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
1837f6f5b1
commit
508e81fc18
@ -1684,6 +1684,14 @@ impl Config {
|
|||||||
let mut lld_enabled = None;
|
let mut lld_enabled = None;
|
||||||
let mut std_features = None;
|
let mut std_features = None;
|
||||||
|
|
||||||
|
let is_user_configured_rust_channel =
|
||||||
|
if let Some(channel) = toml.rust.as_ref().and_then(|r| r.channel.clone()) {
|
||||||
|
config.channel = channel;
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
|
||||||
let default = config.channel == "dev";
|
let default = config.channel == "dev";
|
||||||
config.omit_git_hash = toml.rust.as_ref().and_then(|r| r.omit_git_hash).unwrap_or(default);
|
config.omit_git_hash = toml.rust.as_ref().and_then(|r| r.omit_git_hash).unwrap_or(default);
|
||||||
|
|
||||||
@ -1701,8 +1709,6 @@ impl Config {
|
|||||||
config.in_tree_llvm_info = GitInfo::new(false, &config.src.join("src/llvm-project"));
|
config.in_tree_llvm_info = GitInfo::new(false, &config.src.join("src/llvm-project"));
|
||||||
config.in_tree_gcc_info = GitInfo::new(false, &config.src.join("src/gcc"));
|
config.in_tree_gcc_info = GitInfo::new(false, &config.src.join("src/gcc"));
|
||||||
|
|
||||||
let mut is_user_configured_rust_channel = false;
|
|
||||||
|
|
||||||
if let Some(rust) = toml.rust {
|
if let Some(rust) = toml.rust {
|
||||||
let Rust {
|
let Rust {
|
||||||
optimize: optimize_toml,
|
optimize: optimize_toml,
|
||||||
@ -1724,7 +1730,7 @@ impl Config {
|
|||||||
parallel_compiler,
|
parallel_compiler,
|
||||||
randomize_layout,
|
randomize_layout,
|
||||||
default_linker,
|
default_linker,
|
||||||
channel,
|
channel: _, // already handled above
|
||||||
description,
|
description,
|
||||||
musl_root,
|
musl_root,
|
||||||
rpath,
|
rpath,
|
||||||
@ -1761,9 +1767,6 @@ impl Config {
|
|||||||
std_features: std_features_toml,
|
std_features: std_features_toml,
|
||||||
} = rust;
|
} = rust;
|
||||||
|
|
||||||
is_user_configured_rust_channel = channel.is_some();
|
|
||||||
set(&mut config.channel, channel.clone());
|
|
||||||
|
|
||||||
config.download_rustc_commit =
|
config.download_rustc_commit =
|
||||||
config.download_ci_rustc_commit(download_rustc, config.llvm_assertions);
|
config.download_ci_rustc_commit(download_rustc, config.llvm_assertions);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user