From 04dfdd7403b8dd3f93e26af9a32d34b786e33324 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 7 Jul 2015 10:53:54 -0700 Subject: [PATCH 1/2] Revert "rustc_driver: Omit stage info for stage2+" This reverts commit e66ac43ea4ca489486c5c5dc59974577449fad44. --- src/librustc_driver/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 36438ccc784f8..9a9ac2706a6ab 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -487,6 +487,10 @@ pub fn stage_str() -> Option<&'static str> { Some("stage0") } else if cfg!(stage1) { Some("stage1") + } else if cfg!(stage2) { + Some("stage2") + } else if cfg!(stage3) { + Some("stage3") } else { None } @@ -504,9 +508,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) { println!("commit-date: {}", unw(commit_date_str())); println!("host: {}", config::host_triple()); println!("release: {}", unw(release_str())); - if let Some(stage) = stage_str() { - println!("stage: {}", stage); - } + println!("stage: {}", unw(stage_str())); } } From 147da94206f42a4b30fb1d401530519b58b4a050 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 7 Jul 2015 10:54:06 -0700 Subject: [PATCH 2/2] Revert "rustc_driver: Print stage info in --version --verbose" This reverts commit 555b021c6e531fc375c62160a176dcc4fe77b798. --- src/librustc_driver/lib.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 9a9ac2706a6ab..a9787987611f7 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -481,21 +481,6 @@ pub fn commit_date_str() -> Option<&'static str> { option_env!("CFG_VER_DATE") } -/// Returns a stage string, such as "stage0". -pub fn stage_str() -> Option<&'static str> { - if cfg!(stage0) { - Some("stage0") - } else if cfg!(stage1) { - Some("stage1") - } else if cfg!(stage2) { - Some("stage2") - } else if cfg!(stage3) { - Some("stage3") - } else { - None - } -} - /// Prints version information pub fn version(binary: &str, matches: &getopts::Matches) { let verbose = matches.opt_present("verbose"); @@ -508,7 +493,6 @@ pub fn version(binary: &str, matches: &getopts::Matches) { println!("commit-date: {}", unw(commit_date_str())); println!("host: {}", config::host_triple()); println!("release: {}", unw(release_str())); - println!("stage: {}", unw(stage_str())); } }