diff --git a/src/link/MachO.zig b/src/link/MachO.zig index 44d763289a..c71007157a 100644 --- a/src/link/MachO.zig +++ b/src/link/MachO.zig @@ -451,6 +451,10 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No llvm_object.destroy(self.base.allocator); self.llvm_object = null; + + if (self.base.options.output_mode == .Lib and self.base.options.link_mode == .Static) { + return; + } } }