| ... | @@ -425,7 +425,8 @@ pub fn flush(self: *MachO, comp: *Compilation) !void { | ... | @@ -425,7 +425,8 @@ pub fn flush(self: *MachO, comp: *Compilation) !void { |
| 425 | } | 425 | } |
| 426 | } | 426 | } |
| 427 | | 427 | |
| 428 | if (build_options.is_stage1) { | 428 | const use_stage1 = build_options.is_stage1 and self.base.options.use_stage1; |
| | 429 | if (use_stage1) { |
| 429 | return self.linkWithZld(comp); | 430 | return self.linkWithZld(comp); |
| 430 | } else { | 431 | } else { |
| 431 | switch (self.base.options.effectiveOutputMode()) { | 432 | switch (self.base.options.effectiveOutputMode()) { |
| ... | @@ -3153,7 +3154,7 @@ fn writeSymbolTable(self: *MachO) !void { | ... | @@ -3153,7 +3154,7 @@ fn writeSymbolTable(self: *MachO) !void { |
| 3153 | if (object.debug_info == null) continue; | 3154 | if (object.debug_info == null) continue; |
| 3154 | | 3155 | |
| 3155 | // Open scope | 3156 | // Open scope |
| 3156 | try locals.ensureUnusedCapacity(4); | 3157 | try locals.ensureUnusedCapacity(3); |
| 3157 | locals.appendAssumeCapacity(.{ | 3158 | locals.appendAssumeCapacity(.{ |
| 3158 | .n_strx = try self.makeString(object.tu_comp_dir.?), | 3159 | .n_strx = try self.makeString(object.tu_comp_dir.?), |
| 3159 | .n_type = macho.N_SO, | 3160 | .n_type = macho.N_SO, |
| ... | @@ -3192,7 +3193,7 @@ fn writeSymbolTable(self: *MachO) !void { | ... | @@ -3192,7 +3193,7 @@ fn writeSymbolTable(self: *MachO) !void { |
| 3192 | } | 3193 | } |
| 3193 | | 3194 | |
| 3194 | // Close scope | 3195 | // Close scope |
| 3195 | locals.appendAssumeCapacity(.{ | 3196 | try locals.append(.{ |
| 3196 | .n_strx = 0, | 3197 | .n_strx = 0, |
| 3197 | .n_type = macho.N_SO, | 3198 | .n_type = macho.N_SO, |
| 3198 | .n_sect = 0, | 3199 | .n_sect = 0, |