authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-26 21:23:12-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-26 21:23:12-07:00
log4b403c7eaca50815cae8f2ddde19b4fb476ae8ca
treed3aad3f9e605ddc09c42a668e47572726884df8d
parentb6556c944b88726c2bdb34ce72358ade88c5a984

fix non-ELF linkAsArchive


2 files changed, 7 insertions(+), 3 deletions(-)

BRANCH_TODO+2-2
......@@ -1,7 +1,7 @@
1 * MachO LLD linking
21 * subsystem
3 * mingw-w64
42 * COFF LLD linking
3 * mingw-w64
4 * MachO LLD linking
55 * WASM LLD linking
66 * audit the CLI options for stage2
77 * audit the base cache hash
src/link.zig+5-1
......@@ -417,7 +417,11 @@ pub const File = struct {
417417 const module_obj_path: ?[]const u8 = if (base.options.module) |module| blk: {
418418 const use_stage1 = build_options.is_stage1 and base.options.use_llvm;
419419 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 });
421425 const full_obj_path = try directory.join(arena, &[_][]const u8{obj_basename});
422426 break :blk full_obj_path;
423427 }