| ... | ... | @@ -273,7 +273,7 @@ pub fn openPath(allocator: Allocator, options: link.Options) !*MachO { |
| 273 | 273 | assert(options.target.ofmt == .macho); |
| 274 | 274 | |
| 275 | 275 | const use_stage1 = build_options.have_stage1 and options.use_stage1; |
| 276 | | if (use_stage1 or options.emit == null) { |
| 276 | if (use_stage1 or options.emit == null or options.module == null) { |
| 277 | 277 | return createEmpty(allocator, options); |
| 278 | 278 | } |
| 279 | 279 | |
| ... | ... | @@ -293,11 +293,11 @@ pub fn openPath(allocator: Allocator, options: link.Options) !*MachO { |
| 293 | 293 | }); |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | | if (options.output_mode == .Lib and |
| 297 | | options.link_mode == .Static and self.base.intermediary_basename != null) |
| 298 | | { |
| 299 | | return self; |
| 300 | | } |
| 296 | if (self.base.intermediary_basename != null) switch (options.output_mode) { |
| 297 | .Obj => return self, |
| 298 | .Lib => if (options.link_mode == .Static) return self, |
| 299 | else => {}, |
| 300 | }; |
| 301 | 301 | |
| 302 | 302 | const file = try emit.directory.handle.createFile(emit.sub_path, .{ |
| 303 | 303 | .truncate = false, |