mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
stage2: fix crash using -femit-bin
This commit is contained in:
parent
63cbec1a96
commit
f20929bd8b
@ -2771,6 +2771,8 @@ fn processOneJob(comp: *Compilation, job: Job, main_progress_node: *std.Progress
|
||||
sema_frame.end();
|
||||
sema_frame_ended = true;
|
||||
|
||||
if (comp.bin_file.options.emit == null) return;
|
||||
|
||||
const liveness_frame = tracy.namedFrame("liveness");
|
||||
var liveness_frame_ended = false;
|
||||
errdefer if (!liveness_frame_ended) liveness_frame.end();
|
||||
|
||||
@ -5266,7 +5266,11 @@ pub fn populateTestFunctions(mod: *Module) !void {
|
||||
}
|
||||
|
||||
pub fn linkerUpdateDecl(mod: *Module, decl: *Decl) !void {
|
||||
mod.comp.bin_file.updateDecl(mod, decl) catch |err| switch (err) {
|
||||
const comp = mod.comp;
|
||||
|
||||
if (comp.bin_file.options.emit == null) return;
|
||||
|
||||
comp.bin_file.updateDecl(mod, decl) catch |err| switch (err) {
|
||||
error.OutOfMemory => return error.OutOfMemory,
|
||||
error.AnalysisFail => {
|
||||
decl.analysis = .codegen_failure;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user