| ... | @@ -379,10 +379,6 @@ pub fn deinit(self: *MachO) void { | ... | @@ -379,10 +379,6 @@ pub fn deinit(self: *MachO) void { |
| 379 | } | 379 | } |
| 380 | | 380 | |
| 381 | pub fn flush(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node) link.File.FlushError!void { | 381 | pub fn flush(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node) link.File.FlushError!void { |
| 382 | // TODO: I think this is just a temp and can be removed once we can emit static archives | | |
| 383 | if (self.base.isStaticLib() and build_options.have_llvm) { | | |
| 384 | return self.base.linkAsArchive(arena, prog_node); | | |
| 385 | } | | |
| 386 | try self.flushModule(arena, prog_node); | 382 | try self.flushModule(arena, prog_node); |
| 387 | } | 383 | } |
| 388 | | 384 | |
| ... | @@ -395,8 +391,6 @@ pub fn flushModule(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node | ... | @@ -395,8 +391,6 @@ pub fn flushModule(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node |
| 395 | | 391 | |
| 396 | if (self.llvm_object) |llvm_object| { | 392 | if (self.llvm_object) |llvm_object| { |
| 397 | try self.base.emitLlvmObject(arena, llvm_object, prog_node); | 393 | try self.base.emitLlvmObject(arena, llvm_object, prog_node); |
| 398 | // TODO: I think this is just a temp and can be removed once we can emit static archives | | |
| 399 | if (self.base.isStaticLib() and build_options.have_llvm) return; | | |
| 400 | } | 394 | } |
| 401 | | 395 | |
| 402 | var sub_prog_node = prog_node.start("MachO Flush", 0); | 396 | var sub_prog_node = prog_node.start("MachO Flush", 0); |
| ... | @@ -417,7 +411,7 @@ pub fn flushModule(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node | ... | @@ -417,7 +411,7 @@ pub fn flushModule(self: *MachO, arena: Allocator, prog_node: *std.Progress.Node |
| 417 | if (comp.verbose_link) try self.dumpArgv(comp); | 411 | if (comp.verbose_link) try self.dumpArgv(comp); |
| 418 | | 412 | |
| 419 | if (self.getZigObject()) |zo| try zo.flushModule(self); | 413 | if (self.getZigObject()) |zo| try zo.flushModule(self); |
| 420 | if (self.base.isStaticLib()) return self.flushStaticLib(comp, module_obj_path); | 414 | if (self.base.isStaticLib()) return Archive.flush(self, comp, module_obj_path); |
| 421 | if (self.base.isObject()) return relocatable.flush(self, comp, module_obj_path); | 415 | if (self.base.isObject()) return relocatable.flush(self, comp, module_obj_path); |
| 422 | | 416 | |
| 423 | var positionals = std.ArrayList(Compilation.LinkObject).init(gpa); | 417 | var positionals = std.ArrayList(Compilation.LinkObject).init(gpa); |
| ... | @@ -892,16 +886,6 @@ fn dumpArgv(self: *MachO, comp: *Compilation) !void { | ... | @@ -892,16 +886,6 @@ fn dumpArgv(self: *MachO, comp: *Compilation) !void { |
| 892 | Compilation.dump_argv(argv.items); | 886 | Compilation.dump_argv(argv.items); |
| 893 | } | 887 | } |
| 894 | | 888 | |
| 895 | fn flushStaticLib(self: *MachO, comp: *Compilation, module_obj_path: ?[]const u8) link.File.FlushError!void { | | |
| 896 | _ = comp; | | |
| 897 | _ = module_obj_path; | | |
| 898 | | | |
| 899 | var err = try self.addErrorWithNotes(0); | | |
| 900 | try err.addMsg(self, "TODO implement flushStaticLib", .{}); | | |
| 901 | | | |
| 902 | return error.FlushFailure; | | |
| 903 | } | | |
| 904 | | | |
| 905 | pub fn resolveLibSystem( | 889 | pub fn resolveLibSystem( |
| 906 | self: *MachO, | 890 | self: *MachO, |
| 907 | arena: Allocator, | 891 | arena: Allocator, |