From 091238254e75253597e12ee381a3197751d61973 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sat, 18 Jun 2022 22:55:55 +0200 Subject: [PATCH] macho: return from flushModule if building object for static lib --- src/link/MachO.zig | 4 ++++ 1 file changed, 4 insertions(+) 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; + } } }