File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
# These defaults are meant for contributors to the standard library and documentation.
2
2
[build ]
3
3
bench-stage = 1
4
- build-stage = 1
5
4
check-stage = 1
6
5
test-stage = 1
7
6
Original file line number Diff line number Diff line change @@ -975,7 +975,7 @@ impl Config {
975
975
|| install_stage. is_some ( )
976
976
|| check_stage. is_some ( )
977
977
|| bench_stage. is_some ( ) ;
978
- // See https://github.com/rust-lang/compiler-team/issues/326
978
+
979
979
config. stage = match config. cmd {
980
980
Subcommand :: Check { .. } => flags. stage . or ( check_stage) . unwrap_or ( 0 ) ,
981
981
Subcommand :: Clippy { .. } | Subcommand :: Fix => flags. stage . or ( check_stage) . unwrap_or ( 1 ) ,
@@ -1003,6 +1003,15 @@ impl Config {
1003
1003
| Subcommand :: Vendor { .. } => flags. stage . unwrap_or ( 0 ) ,
1004
1004
} ;
1005
1005
1006
+ // Now check that the selected stage makes sense, and if not, print a warning and end
1007
+ match ( config. stage , & config. cmd ) {
1008
+ ( 0 , Subcommand :: Build ) => {
1009
+ eprintln ! ( "WARNING: cannot build anything on stage 0. Use at least stage 1." ) ;
1010
+ exit ! ( 1 )
1011
+ }
1012
+ _ => { }
1013
+ }
1014
+
1006
1015
// CI should always run stage 2 builds, unless it specifically states otherwise
1007
1016
#[ cfg( not( test) ) ]
1008
1017
if flags. stage . is_none ( ) && config. is_running_on_ci {
You can’t perform that action at this time.
0 commit comments