| ... | @@ -417,7 +417,11 @@ pub const File = struct { | ... | @@ -417,7 +417,11 @@ pub const File = struct { |
| 417 | const module_obj_path: ?[]const u8 = if (base.options.module) |module| blk: { | 417 | const module_obj_path: ?[]const u8 = if (base.options.module) |module| blk: { |
| 418 | const use_stage1 = build_options.is_stage1 and base.options.use_llvm; | 418 | const use_stage1 = build_options.is_stage1 and base.options.use_llvm; |
| 419 | if (use_stage1) { | 419 | if (use_stage1) { |
| 420 | const obj_basename = try std.fmt.allocPrint(arena, "{}.o", .{base.options.root_name}); | 420 | const obj_basename = try std.zig.binNameAlloc(arena, .{ |
| | 421 | .root_name = base.options.root_name, |
| | 422 | .target = base.options.target, |
| | 423 | .output_mode = .Obj, |
| | 424 | }); |
| 421 | const full_obj_path = try directory.join(arena, &[_][]const u8{obj_basename}); | 425 | const full_obj_path = try directory.join(arena, &[_][]const u8{obj_basename}); |
| 422 | break :blk full_obj_path; | 426 | break :blk full_obj_path; |
| 423 | } | 427 | } |