File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
compiler/rustc_session/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2513,7 +2513,17 @@ written to standard error output)"),
25132513 /// in the future. Note that -Zthreads=0 is the way to get
25142514 /// the num_cpus behavior.
25152515 #[ rustc_lint_opt_deny_field_access( "use `Session::threads` instead of this field" ) ]
2516- threads: usize = ( 1 , parse_threads, [ UNTRACKED ] ,
2516+ threads: usize = ( {
2517+ #[ cfg( bootstrap) ]
2518+ {
2519+ 1
2520+ }
2521+
2522+ #[ cfg( not( bootstrap) ) ]
2523+ {
2524+ std:: thread:: available_parallelism( ) . map_or( 1 , NonZero :: <usize >:: get)
2525+ }
2526+ } , parse_threads, [ UNTRACKED ] ,
25172527 "use a thread pool with N threads" ) ,
25182528 time_llvm_passes: bool = ( false , parse_bool, [ UNTRACKED ] ,
25192529 "measure time of each LLVM pass (default: no)" ) ,
You can’t perform that action at this time.
0 commit comments