| ... | ... | @@ -793,11 +793,13 @@ fn linkOneShot(self: *MachO, comp: *Compilation, prog_node: *std.Progress.Node) |
| 793 | 793 | } |
| 794 | 794 | } else { |
| 795 | 795 | const sub_path = self.base.options.emit.?.sub_path; |
| 796 | | self.base.file = try directory.handle.createFile(sub_path, .{ |
| 797 | | .truncate = true, |
| 798 | | .read = true, |
| 799 | | .mode = link.determineMode(self.base.options), |
| 800 | | }); |
| 796 | if (self.base.file == null) { |
| 797 | self.base.file = try directory.handle.createFile(sub_path, .{ |
| 798 | .truncate = true, |
| 799 | .read = true, |
| 800 | .mode = link.determineMode(self.base.options), |
| 801 | }); |
| 802 | } |
| 801 | 803 | // Index 0 is always a null symbol. |
| 802 | 804 | try self.locals.append(gpa, .{ |
| 803 | 805 | .n_strx = 0, |