Skip to content

Commit

Permalink
add explicit stage fields to Config
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Feb 24, 2025
1 parent e0be1a0 commit 37b18f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ pub struct Config {
pub stderr_is_tty: bool,

pub on_fail: Option<String>,
pub explicit_stage_from_cli: bool,
pub explicit_stage_from_config: bool,
pub stage: u32,
pub keep_stage: Vec<u32>,
pub keep_stage_std: Vec<u32>,
Expand Down Expand Up @@ -2323,6 +2325,14 @@ impl Config {
config.compiletest_diff_tool = compiletest_diff_tool;

let download_rustc = config.download_rustc_commit.is_some();
config.explicit_stage_from_cli = flags.stage.is_some();
config.explicit_stage_from_config = test_stage.is_some()
|| build_stage.is_some()
|| doc_stage.is_some()
|| dist_stage.is_some()
|| install_stage.is_some()
|| check_stage.is_some()
|| bench_stage.is_some();
// See https://github.com/rust-lang/compiler-team/issues/326
config.stage = match config.cmd {
Subcommand::Check { .. } => flags.stage.or(check_stage).unwrap_or(0),
Expand Down

0 comments on commit 37b18f8

Please sign in to comment.