@@ -218,7 +218,8 @@ fn parse_config(args: Vec<String>) -> Config {
218218 "the codegen backend to use instead of the default one" ,
219219 "CODEGEN BACKEND [NAME | PATH]" ,
220220 )
221- . optflag ( "" , "bypass-ignore-backends" , "ignore `//@ ignore-backends` directives" ) ;
221+ . optflag ( "" , "bypass-ignore-backends" , "ignore `//@ ignore-backends` directives" )
222+ . reqopt ( "" , "jobs" , "number of parallel jobs bootstrap was configured with" , "JOBS" ) ;
222223
223224 let ( argv0, args_) = args. split_first ( ) . unwrap ( ) ;
224225 if args. len ( ) == 1 || args[ 1 ] == "-h" || args[ 1 ] == "--help" {
@@ -363,6 +364,11 @@ fn parse_config(args: Vec<String>) -> Config {
363364 let build_test_suite_root = opt_path ( matches, "build-test-suite-root" ) ;
364365 assert ! ( build_test_suite_root. starts_with( & build_root) ) ;
365366
367+ let jobs = match matches. opt_str ( "jobs" ) {
368+ Some ( jobs) => jobs. parse :: < u32 > ( ) . expect ( "expected `--jobs` to be an `u32`" ) ,
369+ None => panic ! ( "`--jobs` is required" ) ,
370+ } ;
371+
366372 Config {
367373 bless : matches. opt_present ( "bless" ) ,
368374 fail_fast : matches. opt_present ( "fail-fast" )
@@ -481,6 +487,8 @@ fn parse_config(args: Vec<String>) -> Config {
481487 default_codegen_backend,
482488 override_codegen_backend,
483489 bypass_ignore_backends : matches. opt_present ( "bypass-ignore-backends" ) ,
490+
491+ jobs,
484492 }
485493}
486494
0 commit comments