@@ -1033,8 +1033,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
10331033 // Even though we may have no Zig code to compile (depending on `options.main_pkg`),
10341034 // we may need to use stage1 for building compiler-rt and other dependencies.
10351035
1036- if (build_options .omit_stage2 )
1037- break :blk true ;
10381036 if (options .use_llvm ) | use_llvm | {
10391037 if (! use_llvm ) {
10401038 break :blk false ;
@@ -2176,8 +2174,7 @@ pub fn update(comp: *Compilation) !void {
21762174 comp .c_object_work_queue .writeItemAssumeCapacity (key );
21772175 }
21782176
2179- const use_stage1 = build_options .omit_stage2 or
2180- (build_options .is_stage1 and comp .bin_file .options .use_stage1 );
2177+ const use_stage1 = build_options .is_stage1 and comp .bin_file .options .use_stage1 ;
21812178 if (comp .bin_file .options .module ) | module | {
21822179 module .compile_log_text .shrinkAndFree (module .gpa , 0 );
21832180 module .generation += 1 ;
@@ -2353,8 +2350,7 @@ fn flush(comp: *Compilation, prog_node: *std.Progress.Node) !void {
23532350 };
23542351 comp .link_error_flags = comp .bin_file .errorFlags ();
23552352
2356- const use_stage1 = build_options .omit_stage2 or
2357- (build_options .is_stage1 and comp .bin_file .options .use_stage1 );
2353+ const use_stage1 = build_options .is_stage1 and comp .bin_file .options .use_stage1 ;
23582354 if (! use_stage1 ) {
23592355 if (comp .bin_file .options .module ) | module | {
23602356 try link .File .C .flushEmitH (module );
@@ -2915,9 +2911,6 @@ pub fn performAllTheWork(
29152911fn processOneJob (comp : * Compilation , job : Job ) ! void {
29162912 switch (job ) {
29172913 .codegen_decl = > | decl_index | {
2918- if (build_options .omit_stage2 )
2919- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
2920-
29212914 const module = comp .bin_file .options .module .? ;
29222915 const decl = module .declPtr (decl_index );
29232916
@@ -2952,9 +2945,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void {
29522945 }
29532946 },
29542947 .codegen_func = > | func | {
2955- if (build_options .omit_stage2 )
2956- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
2957-
29582948 const named_frame = tracy .namedFrame ("codegen_func" );
29592949 defer named_frame .end ();
29602950
@@ -2965,9 +2955,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void {
29652955 };
29662956 },
29672957 .emit_h_decl = > | decl_index | {
2968- if (build_options .omit_stage2 )
2969- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
2970-
29712958 const module = comp .bin_file .options .module .? ;
29722959 const decl = module .declPtr (decl_index );
29732960
@@ -3026,19 +3013,13 @@ fn processOneJob(comp: *Compilation, job: Job) !void {
30263013 }
30273014 },
30283015 .analyze_decl = > | decl_index | {
3029- if (build_options .omit_stage2 )
3030- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
3031-
30323016 const module = comp .bin_file .options .module .? ;
30333017 module .ensureDeclAnalyzed (decl_index ) catch | err | switch (err ) {
30343018 error .OutOfMemory = > return error .OutOfMemory ,
30353019 error .AnalysisFail = > return ,
30363020 };
30373021 },
30383022 .update_embed_file = > | embed_file | {
3039- if (build_options .omit_stage2 )
3040- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
3041-
30423023 const named_frame = tracy .namedFrame ("update_embed_file" );
30433024 defer named_frame .end ();
30443025
@@ -3049,9 +3030,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void {
30493030 };
30503031 },
30513032 .update_line_number = > | decl_index | {
3052- if (build_options .omit_stage2 )
3053- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
3054-
30553033 const named_frame = tracy .namedFrame ("update_line_number" );
30563034 defer named_frame .end ();
30573035
@@ -3070,9 +3048,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void {
30703048 };
30713049 },
30723050 .analyze_pkg = > | pkg | {
3073- if (build_options .omit_stage2 )
3074- @panic ("sadly stage2 is omitted from this build to save memory on the CI server" );
3075-
30763051 const named_frame = tracy .namedFrame ("analyze_pkg" );
30773052 defer named_frame .end ();
30783053
0 commit comments