Skip to content

Commit d0a9200

Browse files
committed
link: fix goff and xcoff flush
1 parent e972916 commit d0a9200

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/link/Goff.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ pub fn updateExports(
102102
}
103103

104104
pub fn flush(self: *Goff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Progress.Node) link.File.FlushError!void {
105+
if (build_options.skip_non_native and builtin.object_format != .goff)
106+
@panic("Attempted to compile for object format that was disabled by build configuration");
107+
105108
_ = self;
106109
_ = arena;
107110
_ = tid;
108111
_ = prog_node;
109-
unreachable; // we always use llvm
110112
}

src/link/Xcoff.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ pub fn updateExports(
102102
}
103103

104104
pub fn flush(self: *Xcoff, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Progress.Node) link.File.FlushError!void {
105+
if (build_options.skip_non_native and builtin.object_format != .xcoff)
106+
@panic("Attempted to compile for object format that was disabled by build configuration");
107+
105108
_ = self;
106109
_ = arena;
107110
_ = tid;
108111
_ = prog_node;
109-
unreachable; // we always use llvm
110112
}

0 commit comments

Comments
 (0)