macho: return from flushModule if building object for static lib

This commit is contained in:
Jakub Konka 2022-06-18 22:55:55 +02:00
parent 30ef033693
commit 091238254e

View File

@ -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;
}
}
}