File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,21 @@ pub fn commit_date_str() -> Option<&'static str> {
481
481
option_env ! ( "CFG_VER_DATE" )
482
482
}
483
483
484
+ /// Returns a stage string, such as "stage0".
485
+ pub fn stage_str ( ) -> Option < & ' static str > {
486
+ if cfg ! ( stage0) {
487
+ Some ( "stage0" )
488
+ } else if cfg ! ( stage1) {
489
+ Some ( "stage1" )
490
+ } else if cfg ! ( stage2) {
491
+ Some ( "stage2" )
492
+ } else if cfg ! ( stage3) {
493
+ Some ( "stage3" )
494
+ } else {
495
+ None
496
+ }
497
+ }
498
+
484
499
/// Prints version information
485
500
pub fn version ( binary : & str , matches : & getopts:: Matches ) {
486
501
let verbose = matches. opt_present ( "verbose" ) ;
@@ -493,6 +508,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
493
508
println ! ( "commit-date: {}" , unw( commit_date_str( ) ) ) ;
494
509
println ! ( "host: {}" , config:: host_triple( ) ) ;
495
510
println ! ( "release: {}" , unw( release_str( ) ) ) ;
511
+ println ! ( "stage: {}" , unw( stage_str( ) ) ) ;
496
512
}
497
513
}
498
514
You can’t perform that action at this time.
0 commit comments