File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
compiler/rustc_session/src Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -2123,16 +2123,6 @@ fn should_override_cgus_and_disable_thinlto(
21232123 ( disable_local_thinlto, codegen_units)
21242124}
21252125
2126- fn check_thread_count ( handler : & EarlyErrorHandler , unstable_opts : & UnstableOptions ) {
2127- if unstable_opts. threads == 0 {
2128- handler. early_error ( "value for threads must be a positive non-zero integer" ) ;
2129- }
2130-
2131- if unstable_opts. threads > 1 && unstable_opts. fuel . is_some ( ) {
2132- handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
2133- }
2134- }
2135-
21362126fn collect_print_requests (
21372127 handler : & EarlyErrorHandler ,
21382128 cg : & mut CodegenOptions ,
@@ -2642,7 +2632,13 @@ pub fn build_session_options(
26422632 let ( disable_local_thinlto, mut codegen_units) =
26432633 should_override_cgus_and_disable_thinlto ( handler, & output_types, matches, cg. codegen_units ) ;
26442634
2645- check_thread_count ( handler, & unstable_opts) ;
2635+ if unstable_opts. threads == 0 {
2636+ handler. early_error ( "value for threads must be a positive non-zero integer" ) ;
2637+ }
2638+
2639+ if unstable_opts. threads > 1 && unstable_opts. fuel . is_some ( ) {
2640+ handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
2641+ }
26462642
26472643 let incremental = cg. incremental . as_ref ( ) . map ( PathBuf :: from) ;
26482644
You can’t perform that action at this time.
0 commit comments