mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
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.
This commit is contained in:
parent
33715cb28f
commit
16b87f7082
@ -1214,11 +1214,9 @@ pub const File = struct {
|
||||
object_files.items.ptr,
|
||||
object_files.items.len,
|
||||
switch (target.os.tag) {
|
||||
.linux => .GNU,
|
||||
.freebsd, .openbsd => .BSD,
|
||||
.macos, .ios => .DARWIN,
|
||||
.windows => .GNU,
|
||||
else => .GNU,
|
||||
.aix => .AIXBIG,
|
||||
.windows => .COFF,
|
||||
else => if (target.os.tag.isDarwin()) .DARWIN else .GNU,
|
||||
},
|
||||
);
|
||||
if (bad) return error.UnableToWriteArchive;
|
||||
|
Loading…
Reference in New Issue
Block a user