diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-07 18:17:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-19 16:45:15 -0700 |
| commit | 73bbd1069a993a0e663033ea3b8cd4ed1a123566 (patch) | |
| tree | 1e2b148425da2359d720d6d5048ad94151788bb9 /src/Compilation.zig | |
| parent | 39f43fea8d0f6aa1c69cb7c3209f57f5ce00b273 (diff) | |
| download | zig-73bbd1069a993a0e663033ea3b8cd4ed1a123566.tar.gz zig-73bbd1069a993a0e663033ea3b8cd4ed1a123566.zip | |
build: remove the option to omit stage2
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 060afba694..6d778b955a 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1044,8 +1044,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { // Even though we may have no Zig code to compile (depending on `options.main_pkg`), // we may need to use stage1 for building compiler-rt and other dependencies. - if (build_options.omit_stage2) - break :blk true; if (options.use_llvm) |use_llvm| { if (!use_llvm) { break :blk false; @@ -2213,8 +2211,7 @@ pub fn update(comp: *Compilation) !void { comp.c_object_work_queue.writeItemAssumeCapacity(key); } - const use_stage1 = build_options.omit_stage2 or - (build_options.is_stage1 and comp.bin_file.options.use_stage1); + const use_stage1 = build_options.is_stage1 and comp.bin_file.options.use_stage1; if (comp.bin_file.options.module) |module| { module.compile_log_text.shrinkAndFree(module.gpa, 0); module.generation += 1; @@ -2390,8 +2387,7 @@ fn flush(comp: *Compilation, prog_node: *std.Progress.Node) !void { }; comp.link_error_flags = comp.bin_file.errorFlags(); - const use_stage1 = build_options.omit_stage2 or - (build_options.is_stage1 and comp.bin_file.options.use_stage1); + const use_stage1 = build_options.is_stage1 and comp.bin_file.options.use_stage1; if (!use_stage1) { if (comp.bin_file.options.module) |module| { try link.File.C.flushEmitH(module); @@ -2952,9 +2948,6 @@ pub fn performAllTheWork( fn processOneJob(comp: *Compilation, job: Job) !void { switch (job) { .codegen_decl => |decl_index| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const module = comp.bin_file.options.module.?; const decl = module.declPtr(decl_index); @@ -2989,9 +2982,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { } }, .codegen_func => |func| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const named_frame = tracy.namedFrame("codegen_func"); defer named_frame.end(); @@ -3002,9 +2992,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { }; }, .emit_h_decl => |decl_index| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const module = comp.bin_file.options.module.?; const decl = module.declPtr(decl_index); @@ -3063,9 +3050,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { } }, .analyze_decl => |decl_index| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const module = comp.bin_file.options.module.?; module.ensureDeclAnalyzed(decl_index) catch |err| switch (err) { error.OutOfMemory => return error.OutOfMemory, @@ -3073,9 +3057,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { }; }, .update_embed_file => |embed_file| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const named_frame = tracy.namedFrame("update_embed_file"); defer named_frame.end(); @@ -3086,9 +3067,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { }; }, .update_line_number => |decl_index| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const named_frame = tracy.namedFrame("update_line_number"); defer named_frame.end(); @@ -3107,9 +3085,6 @@ fn processOneJob(comp: *Compilation, job: Job) !void { }; }, .analyze_pkg => |pkg| { - if (build_options.omit_stage2) - @panic("sadly stage2 is omitted from this build to save memory on the CI server"); - const named_frame = tracy.namedFrame("analyze_pkg"); defer named_frame.end(); |
