| ... | ... | @@ -379,10 +379,6 @@ pub fn deinit(self: *MachO) void { |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 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 | 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 | 391 | |
| 396 | 392 | if (self.llvm_object) |llvm_object| { |
| 397 | 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 | 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 | 411 | if (comp.verbose_link) try self.dumpArgv(comp); |
| 418 | 412 | |
| 419 | 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 | 415 | if (self.base.isObject()) return relocatable.flush(self, comp, module_obj_path); |
| 422 | 416 | |
| 423 | 417 | var positionals = std.ArrayList(Compilation.LinkObject).init(gpa); |
| ... | ... | @@ -892,16 +886,6 @@ fn dumpArgv(self: *MachO, comp: *Compilation) !void { |
| 892 | 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 | 889 | pub fn resolveLibSystem( |
| 906 | 890 | self: *MachO, |
| 907 | 891 | arena: Allocator, |