This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -2121,16 +2121,6 @@ fn should_override_cgus_and_disable_thinlto(
21212121 ( disable_local_thinlto, codegen_units)
21222122}
21232123
2124- fn check_thread_count ( handler : & EarlyErrorHandler , unstable_opts : & UnstableOptions ) {
2125- if unstable_opts. threads == 0 {
2126- handler. early_error ( "value for threads must be a positive non-zero integer" ) ;
2127- }
2128-
2129- if unstable_opts. threads > 1 && unstable_opts. fuel . is_some ( ) {
2130- handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
2131- }
2132- }
2133-
21342124fn collect_print_requests (
21352125 handler : & EarlyErrorHandler ,
21362126 cg : & mut CodegenOptions ,
@@ -2646,7 +2636,13 @@ pub fn build_session_options(
26462636 let ( disable_local_thinlto, mut codegen_units) =
26472637 should_override_cgus_and_disable_thinlto ( handler, & output_types, matches, cg. codegen_units ) ;
26482638
2649- check_thread_count ( handler, & unstable_opts) ;
2639+ if unstable_opts. threads == 0 {
2640+ handler. early_error ( "value for threads must be a positive non-zero integer" ) ;
2641+ }
2642+
2643+ if unstable_opts. threads > 1 && unstable_opts. fuel . is_some ( ) {
2644+ handler. early_error ( "optimization fuel is incompatible with multiple threads" ) ;
2645+ }
26502646
26512647 let incremental = cg. incremental . as_ref ( ) . map ( PathBuf :: from) ;
26522648
You can’t perform that action at this time.
0 commit comments