authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-31 01:33:49+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-31 01:33:49+01:00
log16b87f708212850a9ebcda3d91d7ce675ec78fa1
tree4d3ee7025e4b2805c9df95a77b38e0d95da47431
parent33715cb28f5cc73339798048c4e3a2737c72c68f
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

link: Fix archive format selection for some OSs.

* AIX has its own bespoke format. * Handle all Apple platforms. * FreeBSD and OpenBSD both use the GNU format in LLVM. * Windows has since been switched to the COFF format by default in LLVM.

1 files changed, 3 insertions(+), 5 deletions(-)

src/link.zig+3-5
......@@ -1214,11 +1214,9 @@ pub const File = struct {
12141214 object_files.items.ptr,
12151215 object_files.items.len,
12161216 switch (target.os.tag) {
1217 .linux => .GNU,
1218 .freebsd, .openbsd => .BSD,
1219 .macos, .ios => .DARWIN,
1220 .windows => .GNU,
1221 else => .GNU,
1217 .aix => .AIXBIG,
1218 .windows => .COFF,
1219 else => if (target.os.tag.isDarwin()) .DARWIN else .GNU,
12221220 },
12231221 );
12241222 if (bad) return error.UnableToWriteArchive;