authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-13 18:05:46+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-14 11:33:35+01:00
log9ab7eec23e6aa1fc8d5659566e426816ba573537
treeb6b7bbdbccd75ced24eeb677959d41be06b311ff
parent2e6f7d36b9292b2a88a28c3caab767cd9401175d

represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi

Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct OS target. Earlier, when DriverKit support was added to LLVM, it was represented a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in the target triple is beyond me. But this isn't the first time they've ignored established target triple norms (see: armv7k and aarch64_32) and it probably won't be the last. While doing this, I also audited all Darwin OS prongs throughout the codebase and made sure they cover all the tags.

46 files changed, 272 insertions(+), 240 deletions(-)

lib/compiler/aro/aro/Compilation.zig+3-2
...@@ -335,6 +335,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {...@@ -335,6 +335,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
335 .openbsd => try define(w, "__OpenBSD__"),335 .openbsd => try define(w, "__OpenBSD__"),
336 .dragonfly => try define(w, "__DragonFly__"),336 .dragonfly => try define(w, "__DragonFly__"),
337 .illumos => try defineStd(w, "sun", is_gnu),337 .illumos => try defineStd(w, "sun", is_gnu),
338 .maccatalyst,
338 .macos,339 .macos,
339 .tvos,340 .tvos,
340 .ios,341 .ios,
...@@ -635,7 +636,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {...@@ -635,7 +636,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
635 },636 },
636 .aarch64, .aarch64_be => {637 .aarch64, .aarch64_be => {
637 try define(w, "__aarch64__");638 try define(w, "__aarch64__");
638 if (comp.target.os.tag == .macos) {639 if (comp.target.os.tag.isDarwin()) {
639 try define(w, "__AARCH64_SIMD__");640 try define(w, "__AARCH64_SIMD__");
640 if (ptr_width == 32) {641 if (ptr_width == 32) {
641 try define(w, "__ARM64_ARCH_8_32__");642 try define(w, "__ARM64_ARCH_8_32__");
...@@ -992,7 +993,7 @@ fn writeBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode...@@ -992,7 +993,7 @@ fn writeBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode
992 \\993 \\
993 );994 );
994 if (comp.langopts.standard.atLeast(.c11)) switch (comp.target.os.tag) {995 if (comp.langopts.standard.atLeast(.c11)) switch (comp.target.os.tag) {
995 .openbsd, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {996 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
996 try w.writeAll("#define __STDC_NO_THREADS__ 1\n");997 try w.writeAll("#define __STDC_NO_THREADS__ 1\n");
997 },998 },
998 .ps4, .ps5 => {999 .ps4, .ps5 => {
lib/compiler/aro/aro/Driver.zig+1
...@@ -1467,6 +1467,7 @@ pub fn getPICMode(d: *Driver, lastpic: []const u8) Compilation.Error!struct { ba...@@ -1467,6 +1467,7 @@ pub fn getPICMode(d: *Driver, lastpic: []const u8) Compilation.Error!struct { ba
1467 // generation, independent of the argument order.1467 // generation, independent of the argument order.
1468 if (kernel_or_kext and1468 if (kernel_or_kext and
1469 (!(target.os.tag != .ios) or (target.os.isAtLeast(.ios, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and1469 (!(target.os.tag != .ios) or (target.os.isAtLeast(.ios, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and
1470 (!(target.os.tag != .maccatalyst) or (target.os.isAtLeast(.maccatalyst, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and
1470 !(target.os.tag != .watchos) and1471 !(target.os.tag != .watchos) and
1471 !(target.os.tag != .driverkit))1472 !(target.os.tag != .driverkit))
1472 {1473 {
lib/compiler/aro/aro/TypeStore.zig+1-1
...@@ -2091,7 +2091,7 @@ fn generateVaListType(ts: *TypeStore, comp: *Compilation) !QualType {...@@ -2091,7 +2091,7 @@ fn generateVaListType(ts: *TypeStore, comp: *Compilation) !QualType {
2091 .xcore,2091 .xcore,
2092 => return .void_pointer,2092 => return .void_pointer,
2093 .aarch64, .aarch64_be => switch (comp.target.os.tag) {2093 .aarch64, .aarch64_be => switch (comp.target.os.tag) {
2094 .driverkit, .ios, .macos, .tvos, .visionos, .watchos, .windows => return .char_pointer,2094 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => return .char_pointer,
2095 else => .aarch64_va_list,2095 else => .aarch64_va_list,
2096 },2096 },
2097 .arm, .armeb, .thumb, .thumbeb => .arm_va_list,2097 .arm, .armeb, .thumb, .thumbeb => .arm_va_list,
lib/compiler/aro/aro/target.zig+6-3
...@@ -674,7 +674,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -674,7 +674,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
674 .emscripten => "emscripten",674 .emscripten => "emscripten",
675 .uefi => "windows",675 .uefi => "windows",
676 .macos => "macosx",676 .macos => "macosx",
677 .ios => "ios",677 .ios, .maccatalyst => "ios",
678 .tvos => "tvos",678 .tvos => "tvos",
679 .watchos => "watchos",679 .watchos => "watchos",
680 .driverkit => "driverkit",680 .driverkit => "driverkit",
...@@ -703,7 +703,8 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -703,7 +703,8 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
703 writer.writeByte('-') catch unreachable;703 writer.writeByte('-') catch unreachable;
704704
705 const llvm_abi = switch (target.abi) {705 const llvm_abi = switch (target.abi) {
706 .none, .ilp32 => "unknown",706 .none => if (target.os.tag == .maccatalyst) "macabi" else "unknown",
707 .ilp32 => "unknown",
707 .gnu => "gnu",708 .gnu => "gnu",
708 .gnuabin32 => "gnuabin32",709 .gnuabin32 => "gnuabin32",
709 .gnuabi64 => "gnuabi64",710 .gnuabi64 => "gnuabi64",
...@@ -728,7 +729,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -728,7 +729,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
728 .msvc => "msvc",729 .msvc => "msvc",
729 .itanium => "itanium",730 .itanium => "itanium",
730 .simulator => "simulator",731 .simulator => "simulator",
731 .macabi => "macabi",
732 .ohos => "ohos",732 .ohos => "ohos",
733 .ohoseabi => "ohoseabi",733 .ohoseabi => "ohoseabi",
734 };734 };
...@@ -742,6 +742,7 @@ pub fn isPIEDefault(target: std.Target) DefaultPIStatus {...@@ -742,6 +742,7 @@ pub fn isPIEDefault(target: std.Target) DefaultPIStatus {
742 return switch (target.os.tag) {742 return switch (target.os.tag) {
743 .haiku,743 .haiku,
744744
745 .maccatalyst,
745 .macos,746 .macos,
746 .ios,747 .ios,
747 .tvos,748 .tvos,
...@@ -809,6 +810,7 @@ pub fn isPICdefault(target: std.Target) DefaultPIStatus {...@@ -809,6 +810,7 @@ pub fn isPICdefault(target: std.Target) DefaultPIStatus {
809 return switch (target.os.tag) {810 return switch (target.os.tag) {
810 .haiku,811 .haiku,
811812
813 .maccatalyst,
812 .macos,814 .macos,
813 .ios,815 .ios,
814 .tvos,816 .tvos,
...@@ -917,6 +919,7 @@ pub fn isPICDefaultForced(target: std.Target) DefaultPIStatus {...@@ -917,6 +919,7 @@ pub fn isPICDefaultForced(target: std.Target) DefaultPIStatus {
917 return if (target.cpu.arch == .x86_64) .yes else .no;919 return if (target.cpu.arch == .x86_64) .yes else .no;
918 },920 },
919921
922 .maccatalyst,
920 .macos,923 .macos,
921 .ios,924 .ios,
922 .tvos,925 .tvos,
lib/compiler_rt/clear_cache.zig+1-1
...@@ -49,7 +49,7 @@ fn clear_cache(start: usize, end: usize) callconv(.c) void {...@@ -49,7 +49,7 @@ fn clear_cache(start: usize, end: usize) callconv(.c) void {
49 else => false,49 else => false,
50 };50 };
51 const apple = switch (os) {51 const apple = switch (os) {
52 .ios, .macos, .watchos, .tvos, .visionos => true,52 .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => true,
53 else => false,53 else => false,
54 };54 };
55 if (x86) {55 if (x86) {
lib/std/Build/Cache.zig+1-1
...@@ -538,7 +538,7 @@ pub const Manifest = struct {...@@ -538,7 +538,7 @@ pub const Manifest = struct {
538 // disambiguates by returning EEXIST, indicating original538 // disambiguates by returning EEXIST, indicating original
539 // failure was a race, or ENOENT, indicating deletion of539 // failure was a race, or ENOENT, indicating deletion of
540 // the directory of our open handle.540 // the directory of our open handle.
541 if (builtin.os.tag != .macos) {541 if (!builtin.os.tag.isDarwin()) {
542 self.diagnostic = .{ .manifest_create = error.FileNotFound };542 self.diagnostic = .{ .manifest_create = error.FileNotFound };
543 return error.CacheCheckFailed;543 return error.CacheCheckFailed;
544 }544 }
lib/std/Io.zig+1-1
...@@ -564,7 +564,7 @@ pub const Evented = switch (builtin.os.tag) {...@@ -564,7 +564,7 @@ pub const Evented = switch (builtin.os.tag) {
564 .x86_64, .aarch64 => @import("Io/IoUring.zig"),564 .x86_64, .aarch64 => @import("Io/IoUring.zig"),
565 else => void, // context-switching code not implemented yet565 else => void, // context-switching code not implemented yet
566 },566 },
567 .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {567 .dragonfly, .freebsd, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
568 .x86_64, .aarch64 => @import("Io/Kqueue.zig"),568 .x86_64, .aarch64 => @import("Io/Kqueue.zig"),
569 else => void, // context-switching code not implemented yet569 else => void, // context-switching code not implemented yet
570 },570 },
lib/std/Io/Threaded.zig+5-5
...@@ -5140,11 +5140,11 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t {...@@ -5140,11 +5140,11 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t {
5140 return switch (clock) {5140 return switch (clock) {
5141 .real => posix.CLOCK.REALTIME,5141 .real => posix.CLOCK.REALTIME,
5142 .awake => switch (native_os) {5142 .awake => switch (native_os) {
5143 .macos, .ios, .watchos, .tvos => posix.CLOCK.UPTIME_RAW,5143 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.UPTIME_RAW,
5144 else => posix.CLOCK.MONOTONIC,5144 else => posix.CLOCK.MONOTONIC,
5145 },5145 },
5146 .boot => switch (native_os) {5146 .boot => switch (native_os) {
5147 .macos, .ios, .watchos, .tvos => posix.CLOCK.MONOTONIC_RAW,5147 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.MONOTONIC_RAW,
5148 // On freebsd derivatives, use MONOTONIC_FAST as currently there's5148 // On freebsd derivatives, use MONOTONIC_FAST as currently there's
5149 // no precision tradeoff.5149 // no precision tradeoff.
5150 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,5150 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,
...@@ -5687,7 +5687,7 @@ fn futexWait(t: *Threaded, ptr: *const std.atomic.Value(u32), expect: u32) Io.Ca...@@ -5687,7 +5687,7 @@ fn futexWait(t: *Threaded, ptr: *const std.atomic.Value(u32), expect: u32) Io.Ca
5687 else => unreachable,5687 else => unreachable,
5688 };5688 };
5689 },5689 },
5690 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {5690 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
5691 const c = std.c;5691 const c = std.c;
5692 const flags: c.UL = .{5692 const flags: c.UL = .{
5693 .op = .COMPARE_AND_WAIT,5693 .op = .COMPARE_AND_WAIT,
...@@ -5774,7 +5774,7 @@ pub fn futexWaitUncancelable(ptr: *const std.atomic.Value(u32), expect: u32) voi...@@ -5774,7 +5774,7 @@ pub fn futexWaitUncancelable(ptr: *const std.atomic.Value(u32), expect: u32) voi
5774 else => recoverableOsBugDetected(),5774 else => recoverableOsBugDetected(),
5775 }5775 }
5776 },5776 },
5777 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {5777 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
5778 const c = std.c;5778 const c = std.c;
5779 const flags: c.UL = .{5779 const flags: c.UL = .{
5780 .op = .COMPARE_AND_WAIT,5780 .op = .COMPARE_AND_WAIT,
...@@ -5872,7 +5872,7 @@ pub fn futexWake(ptr: *const std.atomic.Value(u32), max_waiters: u32) void {...@@ -5872,7 +5872,7 @@ pub fn futexWake(ptr: *const std.atomic.Value(u32), max_waiters: u32) void {
5872 else => return recoverableOsBugDetected(), // deadlock due to operating system bug5872 else => return recoverableOsBugDetected(), // deadlock due to operating system bug
5873 }5873 }
5874 },5874 },
5875 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {5875 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
5876 const c = std.c;5876 const c = std.c;
5877 const flags: c.UL = .{5877 const flags: c.UL = .{
5878 .op = .COMPARE_AND_WAIT,5878 .op = .COMPARE_AND_WAIT,
lib/std/Progress.zig+4-2
...@@ -1549,11 +1549,13 @@ const have_sigwinch = switch (builtin.os.tag) {...@@ -1549,11 +1549,13 @@ const have_sigwinch = switch (builtin.os.tag) {
1549 .netbsd,1549 .netbsd,
1550 .openbsd,1550 .openbsd,
1551 .haiku,1551 .haiku,
1552 .macos,1552 .driverkit,
1553 .ios,1553 .ios,
1554 .watchos,1554 .maccatalyst,
1555 .macos,
1555 .tvos,1556 .tvos,
1556 .visionos,1557 .visionos,
1558 .watchos,
1557 .dragonfly,1559 .dragonfly,
1558 .freebsd,1560 .freebsd,
1559 .serenity,1561 .serenity,
lib/std/Target.zig+21-11
...@@ -39,6 +39,7 @@ pub const Os = struct {...@@ -39,6 +39,7 @@ pub const Os = struct {
3939
40 driverkit,40 driverkit,
41 ios,41 ios,
42 maccatalyst,
42 macos,43 macos,
43 tvos,44 tvos,
44 visionos,45 visionos,
...@@ -78,6 +79,7 @@ pub const Os = struct {...@@ -78,6 +79,7 @@ pub const Os = struct {
78 return switch (tag) {79 return switch (tag) {
79 .driverkit,80 .driverkit,
80 .ios,81 .ios,
82 .maccatalyst,
81 .macos,83 .macos,
82 .tvos,84 .tvos,
83 .visionos,85 .visionos,
...@@ -121,6 +123,7 @@ pub const Os = struct {...@@ -121,6 +123,7 @@ pub const Os = struct {
121 .windows, .uefi => ".dll",123 .windows, .uefi => ".dll",
122 .driverkit,124 .driverkit,
123 .ios,125 .ios,
126 .maccatalyst,
124 .macos,127 .macos,
125 .tvos,128 .tvos,
126 .visionos,129 .visionos,
...@@ -180,8 +183,9 @@ pub const Os = struct {...@@ -180,8 +183,9 @@ pub const Os = struct {
180 .openbsd,183 .openbsd,
181184
182 .driverkit,185 .driverkit,
183 .macos,
184 .ios,186 .ios,
187 .maccatalyst,
188 .macos,
185 .tvos,189 .tvos,
186 .visionos,190 .visionos,
187 .watchos,191 .watchos,
...@@ -546,7 +550,7 @@ pub const Os = struct {...@@ -546,7 +550,7 @@ pub const Os = struct {
546 .max = .{ .major = 15, .minor = 6, .patch = 0 },550 .max = .{ .major = 15, .minor = 6, .patch = 0 },
547 },551 },
548 },552 },
549 .ios => .{553 .ios, .maccatalyst => .{
550 .semver = .{554 .semver = .{
551 .min = .{ .major = 15, .minor = 0, .patch = 0 },555 .min = .{ .major = 15, .minor = 0, .patch = 0 },
552 .max = .{ .major = 18, .minor = 6, .patch = 0 },556 .max = .{ .major = 18, .minor = 6, .patch = 0 },
...@@ -759,7 +763,6 @@ pub const Abi = enum {...@@ -759,7 +763,6 @@ pub const Abi = enum {
759 msvc,763 msvc,
760 itanium,764 itanium,
761 simulator,765 simulator,
762 macabi,
763 ohos,766 ohos,
764 ohoseabi,767 ohoseabi,
765768
...@@ -885,8 +888,6 @@ pub const Abi = enum {...@@ -885,8 +888,6 @@ pub const Abi = enum {
885 => .eabihf,888 => .eabihf,
886 else => .none,889 else => .none,
887 },890 },
888 .ios => if (arch == .x86_64) .macabi else .none,
889 .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none,
890 .windows => .gnu,891 .windows => .gnu,
891 .uefi => .msvc,892 .uefi => .msvc,
892 .@"3ds" => .eabihf,893 .@"3ds" => .eabihf,
...@@ -902,7 +903,12 @@ pub const Abi = enum {...@@ -902,7 +903,12 @@ pub const Abi = enum {
902 .serenity,903 .serenity,
903 .dragonfly,904 .dragonfly,
904 .driverkit,905 .driverkit,
906 .ios,
907 .maccatalyst,
905 .macos,908 .macos,
909 .tvos,
910 .visionos,
911 .watchos,
906 .ps3,912 .ps3,
907 .ps4,913 .ps4,
908 .ps5,914 .ps5,
...@@ -1018,7 +1024,7 @@ pub const ObjectFormat = enum {...@@ -1018,7 +1024,7 @@ pub const ObjectFormat = enum {
10181024
1019 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {1025 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {
1020 return switch (os_tag) {1026 return switch (os_tag) {
1021 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,1027 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => .macho,
1022 .plan9 => .plan9,1028 .plan9 => .plan9,
1023 .uefi, .windows => .coff,1029 .uefi, .windows => .coff,
1024 else => switch (arch) {1030 else => switch (arch) {
...@@ -1988,7 +1994,7 @@ pub const Cpu = struct {...@@ -1988,7 +1994,7 @@ pub const Cpu = struct {
1988 },1994 },
1989 .armeb, .thumbeb => &arm.cpu.baseline,1995 .armeb, .thumbeb => &arm.cpu.baseline,
1990 .aarch64 => switch (os.tag) {1996 .aarch64 => switch (os.tag) {
1991 .driverkit, .macos => &aarch64.cpu.apple_m1,1997 .driverkit, .maccatalyst, .macos => &aarch64.cpu.apple_m1,
1992 .ios, .tvos => &aarch64.cpu.apple_a7,1998 .ios, .tvos => &aarch64.cpu.apple_a7,
1993 .visionos => &aarch64.cpu.apple_m2,1999 .visionos => &aarch64.cpu.apple_m2,
1994 .watchos => &aarch64.cpu.apple_s4,2000 .watchos => &aarch64.cpu.apple_s4,
...@@ -2014,8 +2020,8 @@ pub const Cpu = struct {...@@ -2014,8 +2020,8 @@ pub const Cpu = struct {
2014 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.2020 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
2015 .x86 => &x86.cpu.pentium4,2021 .x86 => &x86.cpu.pentium4,
2016 .x86_64 => switch (os.tag) {2022 .x86_64 => switch (os.tag) {
2017 .driverkit => &x86.cpu.nehalem,2023 .driverkit, .maccatalyst => &x86.cpu.nehalem,
2018 .ios, .macos, .tvos, .visionos, .watchos => &x86.cpu.core2,2024 .macos => &x86.cpu.core2,
2019 .ps4 => &x86.cpu.btver2,2025 .ps4 => &x86.cpu.btver2,
2020 .ps5 => &x86.cpu.znver2,2026 .ps5 => &x86.cpu.znver2,
2021 else => generic(arch),2027 else => generic(arch),
...@@ -2112,7 +2118,7 @@ pub inline fn isMuslLibC(target: *const Target) bool {...@@ -2112,7 +2118,7 @@ pub inline fn isMuslLibC(target: *const Target) bool {
21122118
2113pub inline fn isDarwinLibC(target: *const Target) bool {2119pub inline fn isDarwinLibC(target: *const Target) bool {
2114 return switch (target.abi) {2120 return switch (target.abi) {
2115 .none, .macabi, .simulator => target.os.tag.isDarwin(),2121 .none, .simulator => target.os.tag.isDarwin(),
2116 else => false,2122 else => false,
2117 };2123 };
2118}2124}
...@@ -2141,8 +2147,9 @@ pub fn requiresLibC(target: *const Target) bool {...@@ -2141,8 +2147,9 @@ pub fn requiresLibC(target: *const Target) bool {
2141 return switch (target.os.tag) {2147 return switch (target.os.tag) {
2142 .illumos,2148 .illumos,
2143 .driverkit,2149 .driverkit,
2144 .macos,
2145 .ios,2150 .ios,
2151 .maccatalyst,
2152 .macos,
2146 .tvos,2153 .tvos,
2147 .watchos,2154 .watchos,
2148 .visionos,2155 .visionos,
...@@ -2307,6 +2314,7 @@ pub const DynamicLinker = struct {...@@ -2307,6 +2314,7 @@ pub const DynamicLinker = struct {
23072314
2308 .driverkit,2315 .driverkit,
2309 .ios,2316 .ios,
2317 .maccatalyst,
2310 .macos,2318 .macos,
2311 .tvos,2319 .tvos,
2312 .visionos,2320 .visionos,
...@@ -2722,6 +2730,7 @@ pub const DynamicLinker = struct {...@@ -2722,6 +2730,7 @@ pub const DynamicLinker = struct {
27222730
2723 .driverkit,2731 .driverkit,
2724 .ios,2732 .ios,
2733 .maccatalyst,
2725 .macos,2734 .macos,
2726 .tvos,2735 .tvos,
2727 .visionos,2736 .visionos,
...@@ -3234,6 +3243,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {...@@ -3234,6 +3243,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
32343243
3235 .driverkit,3244 .driverkit,
3236 .ios,3245 .ios,
3246 .maccatalyst,
3237 .macos,3247 .macos,
3238 .tvos,3248 .tvos,
3239 .visionos,3249 .visionos,
lib/std/Thread.zig+6-6
...@@ -156,7 +156,7 @@ impl: Impl,...@@ -156,7 +156,7 @@ impl: Impl,
156pub const max_name_len = switch (native_os) {156pub const max_name_len = switch (native_os) {
157 .linux => 15,157 .linux => 15,
158 .windows => 31,158 .windows => 31,
159 .macos, .ios, .watchos, .tvos, .visionos => 63,159 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 63,
160 .netbsd => 31,160 .netbsd => 31,
161 .freebsd => 15,161 .freebsd => 15,
162 .openbsd => 23,162 .openbsd => 23,
...@@ -234,7 +234,7 @@ pub fn setName(self: Thread, name: []const u8) SetNameError!void {...@@ -234,7 +234,7 @@ pub fn setName(self: Thread, name: []const u8) SetNameError!void {
234 else => |err| return windows.unexpectedStatus(err),234 else => |err| return windows.unexpectedStatus(err),
235 }235 }
236 },236 },
237 .macos, .ios, .watchos, .tvos, .visionos => if (use_pthreads) {237 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => if (use_pthreads) {
238 // There doesn't seem to be a way to set the name for an arbitrary thread, only the current one.238 // There doesn't seem to be a way to set the name for an arbitrary thread, only the current one.
239 if (self.getHandle() != std.c.pthread_self()) return error.Unsupported;239 if (self.getHandle() != std.c.pthread_self()) return error.Unsupported;
240240
...@@ -351,7 +351,7 @@ pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]co...@@ -351,7 +351,7 @@ pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]co
351 else => |err| return windows.unexpectedStatus(err),351 else => |err| return windows.unexpectedStatus(err),
352 }352 }
353 },353 },
354 .macos, .ios, .watchos, .tvos, .visionos => if (use_pthreads) {354 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => if (use_pthreads) {
355 const err = std.c.pthread_getname_np(self.getHandle(), buffer.ptr, max_name_len + 1);355 const err = std.c.pthread_getname_np(self.getHandle(), buffer.ptr, max_name_len + 1);
356 switch (@as(posix.E, @enumFromInt(err))) {356 switch (@as(posix.E, @enumFromInt(err))) {
357 .SUCCESS => return std.mem.sliceTo(buffer, 0),357 .SUCCESS => return std.mem.sliceTo(buffer, 0),
...@@ -411,7 +411,7 @@ pub const Id = switch (native_os) {...@@ -411,7 +411,7 @@ pub const Id = switch (native_os) {
411 .wasi,411 .wasi,
412 .serenity,412 .serenity,
413 => u32,413 => u32,
414 .macos, .ios, .watchos, .tvos, .visionos => u64,414 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u64,
415 .windows => windows.DWORD,415 .windows => windows.DWORD,
416 else => usize,416 else => usize,
417};417};
...@@ -741,7 +741,7 @@ const PosixThreadImpl = struct {...@@ -741,7 +741,7 @@ const PosixThreadImpl = struct {
741 .linux => {741 .linux => {
742 return LinuxThreadImpl.getCurrentId();742 return LinuxThreadImpl.getCurrentId();
743 },743 },
744 .macos, .ios, .watchos, .tvos, .visionos => {744 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
745 var thread_id: u64 = undefined;745 var thread_id: u64 = undefined;
746 // Pass thread=null to get the current thread ID.746 // Pass thread=null to get the current thread ID.
747 assert(c.pthread_threadid_np(null, &thread_id) == 0);747 assert(c.pthread_threadid_np(null, &thread_id) == 0);
...@@ -1734,7 +1734,7 @@ test "setName, getName" {...@@ -1734,7 +1734,7 @@ test "setName, getName" {
1734 context.test_done_event.wait();1734 context.test_done_event.wait();
17351735
1736 switch (native_os) {1736 switch (native_os) {
1737 .macos, .ios, .watchos, .tvos, .visionos => {1737 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
1738 const res = thread.setName("foobar");1738 const res = thread.setName("foobar");
1739 try std.testing.expectError(error.Unsupported, res);1739 try std.testing.expectError(error.Unsupported, res);
1740 },1740 },
lib/std/builtin.zig+1-1
...@@ -987,7 +987,7 @@ pub const VaList = switch (builtin.cpu.arch) {...@@ -987,7 +987,7 @@ pub const VaList = switch (builtin.cpu.arch) {
987 .xcore,987 .xcore,
988 => *anyopaque,988 => *anyopaque,
989 .aarch64, .aarch64_be => switch (builtin.os.tag) {989 .aarch64, .aarch64_be => switch (builtin.os.tag) {
990 .driverkit, .ios, .macos, .tvos, .visionos, .watchos, .windows => *u8,990 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => *u8,
991 else => switch (builtin.zig_backend) {991 else => switch (builtin.zig_backend) {
992 else => VaListAarch64,992 else => VaListAarch64,
993 .stage2_llvm => @compileError("disabled due to miscompilations"),993 .stage2_llvm => @compileError("disabled due to miscompilations"),
lib/std/c.zig+116-110
...@@ -115,7 +115,7 @@ pub const timespec = switch (native_os) {...@@ -115,7 +115,7 @@ pub const timespec = switch (native_os) {
115 sec: time_t,115 sec: time_t,
116 nsec: c_long,116 nsec: c_long,
117 },117 },
118 .dragonfly, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {118 .dragonfly, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
119 sec: isize,119 sec: isize,
120 nsec: isize,120 nsec: isize,
121 },121 },
...@@ -134,7 +134,7 @@ pub const dev_t = switch (native_os) {...@@ -134,7 +134,7 @@ pub const dev_t = switch (native_os) {
134 .linux => linux.dev_t,134 .linux => linux.dev_t,
135 .emscripten => emscripten.dev_t,135 .emscripten => emscripten.dev_t,
136 .wasi => wasi.device_t,136 .wasi => wasi.device_t,
137 .openbsd, .haiku, .illumos, .macos, .ios, .tvos, .watchos, .visionos => i32,137 .openbsd, .haiku, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => i32,
138 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L43138 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L43
139 .netbsd, .freebsd, .serenity => u64,139 .netbsd, .freebsd, .serenity => u64,
140 else => void,140 else => void,
...@@ -145,7 +145,7 @@ pub const mode_t = switch (native_os) {...@@ -145,7 +145,7 @@ pub const mode_t = switch (native_os) {
145 .emscripten => emscripten.mode_t,145 .emscripten => emscripten.mode_t,
146 .openbsd, .haiku, .netbsd, .illumos, .wasi, .windows => u32,146 .openbsd, .haiku, .netbsd, .illumos, .wasi, .windows => u32,
147 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L44147 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L44
148 .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .dragonfly, .serenity => u16,148 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .dragonfly, .serenity => u16,
149 else => u0,149 else => u0,
150};150};
151151
...@@ -194,7 +194,7 @@ pub const passwd = switch (native_os) {...@@ -194,7 +194,7 @@ pub const passwd = switch (native_os) {
194 dir: ?[*:0]const u8, // home directory194 dir: ?[*:0]const u8, // home directory
195 shell: ?[*:0]const u8, // shell program195 shell: ?[*:0]const u8, // shell program
196 },196 },
197 .netbsd, .openbsd, .macos => extern struct {197 .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
198 name: ?[*:0]const u8, // user name198 name: ?[*:0]const u8, // user name
199 passwd: ?[*:0]const u8, // encrypted password199 passwd: ?[*:0]const u8, // encrypted password
200 uid: uid_t, // user uid200 uid: uid_t, // user uid
...@@ -223,7 +223,7 @@ pub const passwd = switch (native_os) {...@@ -223,7 +223,7 @@ pub const passwd = switch (native_os) {
223};223};
224224
225pub const group = switch (native_os) {225pub const group = switch (native_os) {
226 .linux, .freebsd, .openbsd, .dragonfly, .netbsd, .macos => extern struct {226 .linux, .freebsd, .openbsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
227 name: ?[*:0]const u8,227 name: ?[*:0]const u8,
228 passwd: ?[*:0]const u8,228 passwd: ?[*:0]const u8,
229 gid: gid_t,229 gid: gid_t,
...@@ -275,7 +275,7 @@ pub const CLOCK = clockid_t;...@@ -275,7 +275,7 @@ pub const CLOCK = clockid_t;
275pub const clockid_t = switch (native_os) {275pub const clockid_t = switch (native_os) {
276 .linux, .emscripten => linux.clockid_t,276 .linux, .emscripten => linux.clockid_t,
277 .wasi => wasi.clockid_t,277 .wasi => wasi.clockid_t,
278 .macos, .ios, .tvos, .watchos, .visionos => enum(u32) {278 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(u32) {
279 REALTIME = 0,279 REALTIME = 0,
280 MONOTONIC = 6,280 MONOTONIC = 6,
281 MONOTONIC_RAW = 4,281 MONOTONIC_RAW = 4,
...@@ -457,7 +457,7 @@ pub const E = switch (native_os) {...@@ -457,7 +457,7 @@ pub const E = switch (native_os) {
457 DQUOT = 10069,457 DQUOT = 10069,
458 _,458 _,
459 },459 },
460 .macos, .ios, .tvos, .watchos, .visionos => darwin.E,460 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.E,
461 .freebsd => freebsd.E,461 .freebsd => freebsd.E,
462 .illumos => enum(u16) {462 .illumos => enum(u16) {
463 /// No error occurred.463 /// No error occurred.
...@@ -833,7 +833,7 @@ pub const F = switch (native_os) {...@@ -833,7 +833,7 @@ pub const F = switch (native_os) {
833 pub const GETFL = 3;833 pub const GETFL = 3;
834 pub const SETFL = 4;834 pub const SETFL = 4;
835 },835 },
836 .macos, .ios, .tvos, .watchos, .visionos => struct {836 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
837 /// duplicate file descriptor837 /// duplicate file descriptor
838 pub const DUPFD = 0;838 pub const DUPFD = 0;
839 /// get file descriptor flags839 /// get file descriptor flags
...@@ -1243,7 +1243,7 @@ pub const R_OK = switch (native_os) {...@@ -1243,7 +1243,7 @@ pub const R_OK = switch (native_os) {
1243pub const Flock = switch (native_os) {1243pub const Flock = switch (native_os) {
1244 .linux => linux.Flock,1244 .linux => linux.Flock,
1245 .emscripten => emscripten.Flock,1245 .emscripten => emscripten.Flock,
1246 .openbsd, .dragonfly, .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {1246 .openbsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
1247 start: off_t,1247 start: off_t,
1248 len: off_t,1248 len: off_t,
1249 pid: pid_t,1249 pid: pid_t,
...@@ -1294,7 +1294,7 @@ pub const Flock = switch (native_os) {...@@ -1294,7 +1294,7 @@ pub const Flock = switch (native_os) {
1294};1294};
1295pub const HOST_NAME_MAX = switch (native_os) {1295pub const HOST_NAME_MAX = switch (native_os) {
1296 .linux => linux.HOST_NAME_MAX,1296 .linux => linux.HOST_NAME_MAX,
1297 .macos, .ios, .tvos, .watchos, .visionos => 72,1297 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 72,
1298 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd => 255,1298 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd => 255,
1299 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L221299 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L22
1300 .serenity => 64,1300 .serenity => 64,
...@@ -1305,7 +1305,7 @@ pub const IOV_MAX = switch (native_os) {...@@ -1305,7 +1305,7 @@ pub const IOV_MAX = switch (native_os) {
1305 .emscripten => emscripten.IOV_MAX,1305 .emscripten => emscripten.IOV_MAX,
1306 // https://github.com/SerenityOS/serenity/blob/098af0f846a87b651731780ff48420205fd33754/Kernel/API/POSIX/sys/uio.h#L161306 // https://github.com/SerenityOS/serenity/blob/098af0f846a87b651731780ff48420205fd33754/Kernel/API/POSIX/sys/uio.h#L16
1307 .openbsd, .haiku, .illumos, .wasi, .serenity => 1024,1307 .openbsd, .haiku, .illumos, .wasi, .serenity => 1024,
1308 .macos, .ios, .tvos, .watchos, .visionos => 16,1308 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 16,
1309 .dragonfly, .netbsd, .freebsd => KERN.IOV_MAX,1309 .dragonfly, .netbsd, .freebsd => KERN.IOV_MAX,
1310 else => {},1310 else => {},
1311};1311};
...@@ -1524,7 +1524,7 @@ pub const KERN = switch (native_os) {...@@ -1524,7 +1524,7 @@ pub const KERN = switch (native_os) {
1524pub const MADV = switch (native_os) {1524pub const MADV = switch (native_os) {
1525 .linux => linux.MADV,1525 .linux => linux.MADV,
1526 .emscripten => emscripten.MADV,1526 .emscripten => emscripten.MADV,
1527 .macos, .ios, .tvos, .watchos, .visionos => struct {1527 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1528 pub const NORMAL = 0;1528 pub const NORMAL = 0;
1529 pub const RANDOM = 1;1529 pub const RANDOM = 1;
1530 pub const SEQUENTIAL = 2;1530 pub const SEQUENTIAL = 2;
...@@ -1622,7 +1622,7 @@ pub const MLOCK = switch (native_os) {...@@ -1622,7 +1622,7 @@ pub const MLOCK = switch (native_os) {
1622pub const MSF = switch (native_os) {1622pub const MSF = switch (native_os) {
1623 .linux => linux.MSF,1623 .linux => linux.MSF,
1624 .emscripten => emscripten.MSF,1624 .emscripten => emscripten.MSF,
1625 .macos, .ios, .tvos, .watchos, .visionos => struct {1625 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1626 pub const ASYNC = 0x1;1626 pub const ASYNC = 0x1;
1627 pub const INVALIDATE = 0x2;1627 pub const INVALIDATE = 0x2;
1628 /// invalidate, leave mapped1628 /// invalidate, leave mapped
...@@ -1651,7 +1651,7 @@ pub const NAME_MAX = switch (native_os) {...@@ -1651,7 +1651,7 @@ pub const NAME_MAX = switch (native_os) {
1651 // character, but POSIX definition says that NAME_MAX does not include the1651 // character, but POSIX definition says that NAME_MAX does not include the
1652 // terminating null.1652 // terminating null.
1653 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L201653 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L20
1654 .haiku, .openbsd, .dragonfly, .netbsd, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 255,1654 .haiku, .openbsd, .dragonfly, .netbsd, .illumos, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 255,
1655 else => {},1655 else => {},
1656};1656};
1657pub const PATH_MAX = switch (native_os) {1657pub const PATH_MAX = switch (native_os) {
...@@ -1659,7 +1659,7 @@ pub const PATH_MAX = switch (native_os) {...@@ -1659,7 +1659,7 @@ pub const PATH_MAX = switch (native_os) {
1659 .emscripten => emscripten.PATH_MAX,1659 .emscripten => emscripten.PATH_MAX,
1660 .wasi => 4096,1660 .wasi => 4096,
1661 .windows => 260,1661 .windows => 260,
1662 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 1024,1662 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 1024,
1663 else => {},1663 else => {},
1664};1664};
16651665
...@@ -1676,7 +1676,7 @@ pub const POLL = switch (native_os) {...@@ -1676,7 +1676,7 @@ pub const POLL = switch (native_os) {
1676 pub const NVAL = 0x4000;1676 pub const NVAL = 0x4000;
1677 },1677 },
1678 .windows => ws2_32.POLL,1678 .windows => ws2_32.POLL,
1679 .macos, .ios, .tvos, .watchos, .visionos => struct {1679 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1680 pub const IN = 0x001;1680 pub const IN = 0x001;
1681 pub const PRI = 0x002;1681 pub const PRI = 0x002;
1682 pub const OUT = 0x004;1682 pub const OUT = 0x004;
...@@ -1823,7 +1823,7 @@ pub const PROT = switch (native_os) {...@@ -1823,7 +1823,7 @@ pub const PROT = switch (native_os) {
1823 /// page can be executed1823 /// page can be executed
1824 pub const EXEC = 0x4;1824 pub const EXEC = 0x4;
1825 },1825 },
1826 .macos, .ios, .tvos, .watchos, .visionos => struct {1826 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1827 /// [MC2] no permissions1827 /// [MC2] no permissions
1828 pub const NONE: vm_prot_t = 0x00;1828 pub const NONE: vm_prot_t = 0x00;
1829 /// [MC2] pages can be read1829 /// [MC2] pages can be read
...@@ -1846,7 +1846,7 @@ pub const RLIM = switch (native_os) {...@@ -1846,7 +1846,7 @@ pub const RLIM = switch (native_os) {
1846 .linux => linux.RLIM,1846 .linux => linux.RLIM,
1847 .emscripten => emscripten.RLIM,1847 .emscripten => emscripten.RLIM,
1848 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L521848 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L52
1849 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => struct {1849 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {
1850 /// No limit1850 /// No limit
1851 pub const INFINITY: rlim_t = (1 << 63) - 1;1851 pub const INFINITY: rlim_t = (1 << 63) - 1;
18521852
...@@ -1903,7 +1903,7 @@ pub const S = switch (native_os) {...@@ -1903,7 +1903,7 @@ pub const S = switch (native_os) {
1903 return m & IFMT == IFSOCK;1903 return m & IFMT == IFSOCK;
1904 }1904 }
1905 },1905 },
1906 .macos, .ios, .tvos, .watchos, .visionos => struct {1906 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1907 pub const IFMT = 0o170000;1907 pub const IFMT = 0o170000;
19081908
1909 pub const IFIFO = 0o010000;1909 pub const IFIFO = 0o010000;
...@@ -2396,7 +2396,7 @@ pub const S = switch (native_os) {...@@ -2396,7 +2396,7 @@ pub const S = switch (native_os) {
2396pub const SA = switch (native_os) {2396pub const SA = switch (native_os) {
2397 .linux => linux.SA,2397 .linux => linux.SA,
2398 .emscripten => emscripten.SA,2398 .emscripten => emscripten.SA,
2399 .macos, .ios, .tvos, .watchos, .visionos => struct {2399 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
2400 /// take signal on signal stack2400 /// take signal on signal stack
2401 pub const ONSTACK = 0x0001;2401 pub const ONSTACK = 0x0001;
2402 /// restart system on signal return2402 /// restart system on signal return
...@@ -2502,7 +2502,7 @@ pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {...@@ -2502,7 +2502,7 @@ pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {
2502 PAGESIZE = 39,2502 PAGESIZE = 39,
2503 NPROCESSORS_ONLN = 97,2503 NPROCESSORS_ONLN = 97,
2504} else switch (native_os) {2504} else switch (native_os) {
2505 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {2505 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
2506 PAGESIZE = 29,2506 PAGESIZE = 29,
2507 },2507 },
2508 .dragonfly => enum(c_int) {2508 .dragonfly => enum(c_int) {
...@@ -2562,7 +2562,7 @@ pub const SEEK = switch (native_os) {...@@ -2562,7 +2562,7 @@ pub const SEEK = switch (native_os) {
2562 pub const END: wasi.whence_t = .END;2562 pub const END: wasi.whence_t = .END;
2563 },2563 },
2564 // https://github.com/SerenityOS/serenity/blob/808ce594db1f2190e5212a250e900bde2ffe710b/Kernel/API/POSIX/stdio.h#L15-L172564 // https://github.com/SerenityOS/serenity/blob/808ce594db1f2190e5212a250e900bde2ffe710b/Kernel/API/POSIX/stdio.h#L15-L17
2565 .openbsd, .haiku, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows, .serenity => struct {2565 .openbsd, .haiku, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows, .serenity => struct {
2566 pub const SET = 0;2566 pub const SET = 0;
2567 pub const CUR = 1;2567 pub const CUR = 1;
2568 pub const END = 2;2568 pub const END = 2;
...@@ -2622,7 +2622,7 @@ pub const SIG = switch (native_os) {...@@ -2622,7 +2622,7 @@ pub const SIG = switch (native_os) {
2622 /// Signal error value (returned by signal call on error)2622 /// Signal error value (returned by signal call on error)
2623 pub const ERR = -1;2623 pub const ERR = -1;
2624 },2624 },
2625 .macos, .ios, .tvos, .watchos, .visionos => enum(u32) {2625 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(u32) {
2626 pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));2626 pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
2627 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);2627 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
2628 pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);2628 pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
...@@ -3185,7 +3185,7 @@ pub const Sigaction = switch (native_os) {...@@ -3185,7 +3185,7 @@ pub const Sigaction = switch (native_os) {
3185 else => common_linux_Sigaction,3185 else => common_linux_Sigaction,
3186 },3186 },
3187 .emscripten => emscripten.Sigaction,3187 .emscripten => emscripten.Sigaction,
3188 .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {3188 .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
3189 pub const handler_fn = *align(1) const fn (SIG) callconv(.c) void;3189 pub const handler_fn = *align(1) const fn (SIG) callconv(.c) void;
3190 pub const sigaction_fn = *const fn (SIG, *const siginfo_t, ?*anyopaque) callconv(.c) void;3190 pub const sigaction_fn = *const fn (SIG, *const siginfo_t, ?*anyopaque) callconv(.c) void;
31913191
...@@ -3273,7 +3273,7 @@ pub const Sigaction = switch (native_os) {...@@ -3273,7 +3273,7 @@ pub const Sigaction = switch (native_os) {
3273};3273};
3274pub const T = switch (native_os) {3274pub const T = switch (native_os) {
3275 .linux => linux.T,3275 .linux => linux.T,
3276 .macos, .ios, .tvos, .watchos, .visionos => struct {3276 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
3277 pub const IOCGWINSZ = ior(0x40000000, 't', 104, @sizeOf(winsize));3277 pub const IOCGWINSZ = ior(0x40000000, 't', 104, @sizeOf(winsize));
32783278
3279 fn ior(inout: u32, group_arg: usize, num: usize, len: usize) usize {3279 fn ior(inout: u32, group_arg: usize, num: usize, len: usize) usize {
...@@ -3664,7 +3664,7 @@ pub const T = switch (native_os) {...@@ -3664,7 +3664,7 @@ pub const T = switch (native_os) {
3664};3664};
3665pub const IOCPARM_MASK = switch (native_os) {3665pub const IOCPARM_MASK = switch (native_os) {
3666 .windows => ws2_32.IOCPARM_MASK,3666 .windows => ws2_32.IOCPARM_MASK,
3667 .macos, .ios, .tvos, .watchos, .visionos => 0x1fff,3667 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 0x1fff,
3668 else => void,3668 else => void,
3669};3669};
3670pub const TCSA = std.posix.TCSA;3670pub const TCSA = std.posix.TCSA;
...@@ -3679,7 +3679,7 @@ pub const VDSO = switch (native_os) {...@@ -3679,7 +3679,7 @@ pub const VDSO = switch (native_os) {
3679pub const W = switch (native_os) {3679pub const W = switch (native_os) {
3680 .linux => linux.W,3680 .linux => linux.W,
3681 .emscripten => emscripten.W,3681 .emscripten => emscripten.W,
3682 .macos, .ios, .tvos, .watchos, .visionos => struct {3682 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
3683 /// [XSI] no hang in wait/no child to reap3683 /// [XSI] no hang in wait/no child to reap
3684 pub const NOHANG = 0x00000001;3684 pub const NOHANG = 0x00000001;
3685 /// [XSI] notify on stop, untraced child3685 /// [XSI] notify on stop, untraced child
...@@ -3939,7 +3939,7 @@ pub const accept_filter_arg = switch (native_os) {...@@ -3939,7 +3939,7 @@ pub const accept_filter_arg = switch (native_os) {
3939 // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L1643939 // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L164
3940 // https://github.com/NetBSD/src/blob/cad5c68a8524927f65e22ad651de3905382be6e0/sys/sys/socket.h#L1883940 // https://github.com/NetBSD/src/blob/cad5c68a8524927f65e22ad651de3905382be6e0/sys/sys/socket.h#L188
3941 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L5043941 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L504
3942 .freebsd, .dragonfly, .netbsd, .macos, .driverkit, .ios, .tvos, .watchos, .visionos => extern struct {3942 .freebsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
3943 name: [16]u8,3943 name: [16]u8,
3944 arg: [240]u8,3944 arg: [240]u8,
3945 },3945 },
...@@ -3948,7 +3948,7 @@ pub const accept_filter_arg = switch (native_os) {...@@ -3948,7 +3948,7 @@ pub const accept_filter_arg = switch (native_os) {
3948pub const clock_t = switch (native_os) {3948pub const clock_t = switch (native_os) {
3949 .linux => linux.clock_t,3949 .linux => linux.clock_t,
3950 .emscripten => emscripten.clock_t,3950 .emscripten => emscripten.clock_t,
3951 .macos, .ios, .tvos, .watchos, .visionos => c_ulong,3951 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_ulong,
3952 .freebsd => isize,3952 .freebsd => isize,
3953 .openbsd, .illumos => i64,3953 .openbsd, .illumos => i64,
3954 .netbsd => u32,3954 .netbsd => u32,
...@@ -4034,7 +4034,7 @@ pub const in_pktinfo = switch (native_os) {...@@ -4034,7 +4034,7 @@ pub const in_pktinfo = switch (native_os) {
4034 .linux => linux.in_pktinfo,4034 .linux => linux.in_pktinfo,
4035 // https://github.com/illumos/illumos-gate/blob/608eb926e14f4ba4736b2d59e891335f1cba9e1e/usr/src/uts/common/netinet/in.h#L11324035 // https://github.com/illumos/illumos-gate/blob/608eb926e14f4ba4736b2d59e891335f1cba9e1e/usr/src/uts/common/netinet/in.h#L1132
4036 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet/in.h#L6964036 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet/in.h#L696
4037 .illumos, .driverkit, .ios, .macos, .tvos, .watchos, .visionos => extern struct {4037 .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
4038 ifindex: u32,4038 ifindex: u32,
4039 spec_dst: u32,4039 spec_dst: u32,
4040 addr: u32,4040 addr: u32,
...@@ -4051,7 +4051,7 @@ pub const in6_pktinfo = switch (native_os) {...@@ -4051,7 +4051,7 @@ pub const in6_pktinfo = switch (native_os) {
4051 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet6/in6.h#L7374051 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet6/in6.h#L737
4052 // https://github.com/haiku/haiku/blob/2aab5f5f14aeb3f34c3a3d9a9064cc3c0d914bea/headers/posix/netinet6/in6.h#L634052 // https://github.com/haiku/haiku/blob/2aab5f5f14aeb3f34c3a3d9a9064cc3c0d914bea/headers/posix/netinet6/in6.h#L63
4053 // https://github.com/SerenityOS/serenity/blob/5bd8af99be0bc4b2e14f361fd7d7590e6bcfa4d6/Kernel/API/POSIX/sys/socket.h#L1224053 // https://github.com/SerenityOS/serenity/blob/5bd8af99be0bc4b2e14f361fd7d7590e6bcfa4d6/Kernel/API/POSIX/sys/socket.h#L122
4054 .freebsd, .dragonfly, .netbsd, .openbsd, .illumos, .driverkit, .ios, .macos, .tvos, .watchos, .visionos, .haiku, .serenity => extern struct {4054 .freebsd, .dragonfly, .netbsd, .openbsd, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku, .serenity => extern struct {
4055 addr: [16]u8,4055 addr: [16]u8,
4056 ifindex: u32,4056 ifindex: u32,
4057 },4057 },
...@@ -4084,10 +4084,11 @@ pub const linger = switch (native_os) {...@@ -4084,10 +4084,11 @@ pub const linger = switch (native_os) {
4084 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L4984084 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L498
4085 .driverkit,4085 .driverkit,
4086 .ios,4086 .ios,
4087 .maccatalyst,
4087 .macos,4088 .macos,
4088 .tvos,4089 .tvos,
4089 .watchos,
4090 .visionos,4090 .visionos,
4091 .watchos,
4091 => extern struct {4092 => extern struct {
4092 onoff: i32, // non-zero to linger on close4093 onoff: i32, // non-zero to linger on close
4093 linger: i32, // time to linger in seconds4094 linger: i32, // time to linger in seconds
...@@ -4104,9 +4105,10 @@ pub const msghdr = switch (native_os) {...@@ -4104,9 +4105,10 @@ pub const msghdr = switch (native_os) {
4104 .netbsd,4105 .netbsd,
4105 .haiku,4106 .haiku,
4106 .illumos,4107 .illumos,
4107 .macos,
4108 .driverkit,4108 .driverkit,
4109 .ios,4109 .ios,
4110 .maccatalyst,
4111 .macos,
4110 .tvos,4112 .tvos,
4111 .visionos,4113 .visionos,
4112 .watchos,4114 .watchos,
...@@ -4139,9 +4141,10 @@ pub const msghdr_const = switch (native_os) {...@@ -4139,9 +4141,10 @@ pub const msghdr_const = switch (native_os) {
4139 .netbsd,4141 .netbsd,
4140 .haiku,4142 .haiku,
4141 .illumos,4143 .illumos,
4142 .macos,
4143 .driverkit,4144 .driverkit,
4144 .ios,4145 .ios,
4146 .maccatalyst,
4147 .macos,
4145 .tvos,4148 .tvos,
4146 .visionos,4149 .visionos,
4147 .watchos,4150 .watchos,
...@@ -4191,9 +4194,10 @@ pub const cmsghdr = switch (native_os) {...@@ -4191,9 +4194,10 @@ pub const cmsghdr = switch (native_os) {
4191 // https://github.com/haiku/haiku/blob/b54f586058fd6623645512e4631468cede9933b9/headers/posix/sys/socket.h#L1324194 // https://github.com/haiku/haiku/blob/b54f586058fd6623645512e4631468cede9933b9/headers/posix/sys/socket.h#L132
4192 .haiku,4195 .haiku,
4193 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L10414196 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1041
4194 .macos,
4195 .driverkit,4197 .driverkit,
4196 .ios,4198 .ios,
4199 .maccatalyst,
4200 .macos,
4197 .tvos,4201 .tvos,
4198 .visionos,4202 .visionos,
4199 .watchos,4203 .watchos,
...@@ -4215,7 +4219,7 @@ pub const nfds_t = switch (native_os) {...@@ -4215,7 +4219,7 @@ pub const nfds_t = switch (native_os) {
4215 .emscripten => emscripten.nfds_t,4219 .emscripten => emscripten.nfds_t,
4216 .haiku, .illumos, .wasi => usize,4220 .haiku, .illumos, .wasi => usize,
4217 .windows => c_ulong,4221 .windows => c_ulong,
4218 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u32,4222 .openbsd, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u32,
4219 // https://github.com/SerenityOS/serenity/blob/265764ff2fec038855193296588a887fc322d76a/Kernel/API/POSIX/poll.h#L324223 // https://github.com/SerenityOS/serenity/blob/265764ff2fec038855193296588a887fc322d76a/Kernel/API/POSIX/poll.h#L32
4220 .serenity => c_uint,4224 .serenity => c_uint,
4221 else => void,4225 else => void,
...@@ -4251,7 +4255,7 @@ pub const pollfd = switch (native_os) {...@@ -4251,7 +4255,7 @@ pub const pollfd = switch (native_os) {
4251pub const rlim_t = switch (native_os) {4255pub const rlim_t = switch (native_os) {
4252 .linux => linux.rlim_t,4256 .linux => linux.rlim_t,
4253 .emscripten => emscripten.rlim_t,4257 .emscripten => emscripten.rlim_t,
4254 .openbsd, .netbsd, .illumos, .macos, .ios, .tvos, .watchos, .visionos => u64,4258 .openbsd, .netbsd, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u64,
4255 .haiku, .dragonfly, .freebsd => i64,4259 .haiku, .dragonfly, .freebsd => i64,
4256 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L544260 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L54
4257 .serenity => usize,4261 .serenity => usize,
...@@ -4271,7 +4275,7 @@ pub const rlimit = switch (native_os) {...@@ -4271,7 +4275,7 @@ pub const rlimit = switch (native_os) {
4271pub const rlimit_resource = switch (native_os) {4275pub const rlimit_resource = switch (native_os) {
4272 .linux => linux.rlimit_resource,4276 .linux => linux.rlimit_resource,
4273 .emscripten => emscripten.rlimit_resource,4277 .emscripten => emscripten.rlimit_resource,
4274 .openbsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {4278 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
4275 CPU = 0,4279 CPU = 0,
4276 FSIZE = 1,4280 FSIZE = 1,
4277 DATA = 2,4281 DATA = 2,
...@@ -4378,7 +4382,7 @@ pub const rlimit_resource = switch (native_os) {...@@ -4378,7 +4382,7 @@ pub const rlimit_resource = switch (native_os) {
4378pub const rusage = switch (native_os) {4382pub const rusage = switch (native_os) {
4379 .linux => linux.rusage,4383 .linux => linux.rusage,
4380 .emscripten => emscripten.rusage,4384 .emscripten => emscripten.rusage,
4381 .macos, .ios, .tvos, .watchos, .visionos => extern struct {4385 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
4382 utime: timeval,4386 utime: timeval,
4383 stime: timeval,4387 stime: timeval,
4384 maxrss: isize,4388 maxrss: isize,
...@@ -4449,7 +4453,7 @@ pub const rusage = switch (native_os) {...@@ -4449,7 +4453,7 @@ pub const rusage = switch (native_os) {
4449pub const siginfo_t = switch (native_os) {4453pub const siginfo_t = switch (native_os) {
4450 .linux => linux.siginfo_t,4454 .linux => linux.siginfo_t,
4451 .emscripten => emscripten.siginfo_t,4455 .emscripten => emscripten.siginfo_t,
4452 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => extern struct {4456 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
4453 signo: SIG,4457 signo: SIG,
4454 errno: c_int,4458 errno: c_int,
4455 code: c_int,4459 code: c_int,
...@@ -4639,7 +4643,7 @@ pub const sigset_t = switch (native_os) {...@@ -4639,7 +4643,7 @@ pub const sigset_t = switch (native_os) {
4639 .emscripten => emscripten.sigset_t,4643 .emscripten => emscripten.sigset_t,
4640 // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L194644 // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L19
4641 .openbsd, .serenity => u32,4645 .openbsd, .serenity => u32,
4642 .macos, .ios, .tvos, .watchos, .visionos => darwin.sigset_t,4646 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.sigset_t,
4643 .dragonfly, .netbsd, .illumos, .freebsd => extern struct {4647 .dragonfly, .netbsd, .illumos, .freebsd => extern struct {
4644 __bits: [SIG.WORDS]u32,4648 __bits: [SIG.WORDS]u32,
4645 },4649 },
...@@ -4669,7 +4673,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {...@@ -4669,7 +4673,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {
4669} else switch (native_os) {4673} else switch (native_os) {
4670 .linux, .emscripten => linux.addrinfo,4674 .linux, .emscripten => linux.addrinfo,
4671 .windows => ws2_32.addrinfo,4675 .windows => ws2_32.addrinfo,
4672 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {4676 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
4673 flags: AI,4677 flags: AI,
4674 family: i32,4678 family: i32,
4675 socktype: i32,4679 socktype: i32,
...@@ -4735,7 +4739,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {...@@ -4735,7 +4739,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {
4735pub const sockaddr = switch (native_os) {4739pub const sockaddr = switch (native_os) {
4736 .linux, .emscripten => linux.sockaddr,4740 .linux, .emscripten => linux.sockaddr,
4737 .windows => ws2_32.sockaddr,4741 .windows => ws2_32.sockaddr,
4738 .macos, .ios, .tvos, .watchos, .visionos => extern struct {4742 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
4739 len: u8,4743 len: u8,
4740 family: sa_family_t,4744 family: sa_family_t,
4741 data: [14]u8,4745 data: [14]u8,
...@@ -5077,7 +5081,7 @@ pub const in_port_t = u16;...@@ -5077,7 +5081,7 @@ pub const in_port_t = u16;
5077pub const sa_family_t = switch (native_os) {5081pub const sa_family_t = switch (native_os) {
5078 .linux, .emscripten => linux.sa_family_t,5082 .linux, .emscripten => linux.sa_family_t,
5079 .windows => ws2_32.ADDRESS_FAMILY,5083 .windows => ws2_32.ADDRESS_FAMILY,
5080 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u8,5084 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u8,
5081 // https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L665085 // https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L66
5082 .illumos, .serenity => u16,5086 .illumos, .serenity => u16,
5083 else => void,5087 else => void,
...@@ -5130,7 +5134,7 @@ pub const AF = if (builtin.abi.isAndroid()) struct {...@@ -5130,7 +5134,7 @@ pub const AF = if (builtin.abi.isAndroid()) struct {
5130} else switch (native_os) {5134} else switch (native_os) {
5131 .linux, .emscripten => linux.AF,5135 .linux, .emscripten => linux.AF,
5132 .windows => ws2_32.AF,5136 .windows => ws2_32.AF,
5133 .macos, .ios, .tvos, .watchos, .visionos => struct {5137 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
5134 pub const UNSPEC = 0;5138 pub const UNSPEC = 0;
5135 pub const LOCAL = 1;5139 pub const LOCAL = 1;
5136 pub const UNIX = LOCAL;5140 pub const UNIX = LOCAL;
...@@ -5416,7 +5420,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {...@@ -5416,7 +5420,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {
5416 pub const PF_MAX = AF.MAX;5420 pub const PF_MAX = AF.MAX;
5417} else switch (native_os) {5421} else switch (native_os) {
5418 .linux, .emscripten => linux.PF,5422 .linux, .emscripten => linux.PF,
5419 .macos, .ios, .tvos, .watchos, .visionos => struct {5423 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
5420 pub const UNSPEC = AF.UNSPEC;5424 pub const UNSPEC = AF.UNSPEC;
5421 pub const LOCAL = AF.LOCAL;5425 pub const LOCAL = AF.LOCAL;
5422 pub const UNIX = PF.LOCAL;5426 pub const UNIX = PF.LOCAL;
...@@ -5650,7 +5654,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {...@@ -5650,7 +5654,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {
5650pub const DT = switch (native_os) {5654pub const DT = switch (native_os) {
5651 .linux => linux.DT,5655 .linux => linux.DT,
5652 // https://github.com/SerenityOS/serenity/blob/1262a7d1424d0d2e89d80644409721cbf056ab17/Kernel/API/POSIX/dirent.h#L16-L355656 // https://github.com/SerenityOS/serenity/blob/1262a7d1424d0d2e89d80644409721cbf056ab17/Kernel/API/POSIX/dirent.h#L16-L35
5653 .netbsd, .freebsd, .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => struct {5657 .netbsd, .freebsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {
5654 pub const UNKNOWN = 0;5658 pub const UNKNOWN = 0;
5655 pub const FIFO = 1;5659 pub const FIFO = 1;
5656 pub const CHR = 2;5660 pub const CHR = 2;
...@@ -5679,7 +5683,7 @@ pub const MSG = switch (native_os) {...@@ -5679,7 +5683,7 @@ pub const MSG = switch (native_os) {
5679 .linux => linux.MSG,5683 .linux => linux.MSG,
5680 .emscripten => emscripten.MSG,5684 .emscripten => emscripten.MSG,
5681 .windows => ws2_32.MSG,5685 .windows => ws2_32.MSG,
5682 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => darwin.MSG,5686 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.MSG,
5683 .haiku => struct {5687 .haiku => struct {
5684 pub const OOB = 0x0001;5688 pub const OOB = 0x0001;
5685 pub const PEEK = 0x0002;5689 pub const PEEK = 0x0002;
...@@ -5796,7 +5800,7 @@ pub const SOCK = switch (native_os) {...@@ -5796,7 +5800,7 @@ pub const SOCK = switch (native_os) {
5796 .linux => linux.SOCK,5800 .linux => linux.SOCK,
5797 .emscripten => emscripten.SOCK,5801 .emscripten => emscripten.SOCK,
5798 .windows => ws2_32.SOCK,5802 .windows => ws2_32.SOCK,
5799 .macos, .ios, .tvos, .watchos, .visionos => struct {5803 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
5800 pub const STREAM = 1;5804 pub const STREAM = 1;
5801 pub const DGRAM = 2;5805 pub const DGRAM = 2;
5802 pub const RAW = 3;5806 pub const RAW = 3;
...@@ -5897,7 +5901,7 @@ pub const SOCK = switch (native_os) {...@@ -5897,7 +5901,7 @@ pub const SOCK = switch (native_os) {
5897 else => void,5901 else => void,
5898};5902};
5899pub const TCP = switch (native_os) {5903pub const TCP = switch (native_os) {
5900 .macos => darwin.TCP,5904 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.TCP,
5901 .linux => linux.TCP,5905 .linux => linux.TCP,
5902 .emscripten => emscripten.TCP,5906 .emscripten => emscripten.TCP,
5903 .windows => ws2_32.TCP,5907 .windows => ws2_32.TCP,
...@@ -5911,7 +5915,7 @@ pub const TCP = switch (native_os) {...@@ -5911,7 +5915,7 @@ pub const TCP = switch (native_os) {
5911pub const IPPROTO = switch (native_os) {5915pub const IPPROTO = switch (native_os) {
5912 .linux, .emscripten => linux.IPPROTO,5916 .linux, .emscripten => linux.IPPROTO,
5913 .windows => ws2_32.IPPROTO,5917 .windows => ws2_32.IPPROTO,
5914 .macos, .ios, .tvos, .watchos, .visionos => struct {5918 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
5915 pub const ICMP = 1;5919 pub const ICMP = 1;
5916 pub const ICMPV6 = 58;5920 pub const ICMPV6 = 58;
5917 pub const TCP = 6;5921 pub const TCP = 6;
...@@ -6543,7 +6547,7 @@ pub const SOL = switch (native_os) {...@@ -6543,7 +6547,7 @@ pub const SOL = switch (native_os) {
6543 .linux => linux.SOL,6547 .linux => linux.SOL,
6544 .emscripten => emscripten.SOL,6548 .emscripten => emscripten.SOL,
6545 .windows => ws2_32.SOL,6549 .windows => ws2_32.SOL,
6546 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {6550 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
6547 pub const SOCKET = 0xffff;6551 pub const SOCKET = 0xffff;
6548 },6552 },
6549 .illumos => struct {6553 .illumos => struct {
...@@ -6562,7 +6566,7 @@ pub const SO = switch (native_os) {...@@ -6562,7 +6566,7 @@ pub const SO = switch (native_os) {
6562 .linux => linux.SO,6566 .linux => linux.SO,
6563 .emscripten => emscripten.SO,6567 .emscripten => emscripten.SO,
6564 .windows => ws2_32.SO,6568 .windows => ws2_32.SO,
6565 .macos, .ios, .tvos, .watchos, .visionos => struct {6569 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
6566 pub const DEBUG = 0x0001;6570 pub const DEBUG = 0x0001;
6567 pub const ACCEPTCONN = 0x0002;6571 pub const ACCEPTCONN = 0x0002;
6568 pub const REUSEADDR = 0x0004;6572 pub const REUSEADDR = 0x0004;
...@@ -6807,7 +6811,7 @@ pub const SOMAXCONN = switch (native_os) {...@@ -6807,7 +6811,7 @@ pub const SOMAXCONN = switch (native_os) {
6807 // https://github.com/NetBSD/src/blob/a673fb3f8487e974c669216064f7588207229fea/sys/sys/socket.h#L4726811 // https://github.com/NetBSD/src/blob/a673fb3f8487e974c669216064f7588207229fea/sys/sys/socket.h#L472
6808 // https://github.com/openbsd/src/blob/8ba9cd88f10123fef7af805b8e5ccc2463ad8fa4/sys/sys/socket.h#L4836812 // https://github.com/openbsd/src/blob/8ba9cd88f10123fef7af805b8e5ccc2463ad8fa4/sys/sys/socket.h#L483
6809 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L8156813 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L815
6810 .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .macos, .ios, .tvos, .watchos, .visionos => 128,6814 .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 128,
6811 else => void,6815 else => void,
6812};6816};
6813pub const SCM = switch (native_os) {6817pub const SCM = switch (native_os) {
...@@ -6856,7 +6860,7 @@ pub const SCM = switch (native_os) {...@@ -6856,7 +6860,7 @@ pub const SCM = switch (native_os) {
6856 pub const TIMESTAMP = 0x04;6860 pub const TIMESTAMP = 0x04;
6857 },6861 },
6858 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L11146862 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1114
6859 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => struct {6863 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
6860 pub const RIGHTS = 1;6864 pub const RIGHTS = 1;
6861 pub const TIMESTAMP = 2;6865 pub const TIMESTAMP = 2;
6862 pub const CREDS = 3;6866 pub const CREDS = 3;
...@@ -6870,7 +6874,7 @@ pub const IFNAMESIZE = switch (native_os) {...@@ -6870,7 +6874,7 @@ pub const IFNAMESIZE = switch (native_os) {
6870 .emscripten => emscripten.IFNAMESIZE,6874 .emscripten => emscripten.IFNAMESIZE,
6871 .windows => 30,6875 .windows => 30,
6872 // https://github.com/SerenityOS/serenity/blob/9882848e0bf783dfc8e8a6d887a848d70d9c58f4/Kernel/API/POSIX/net/if.h#L506876 // https://github.com/SerenityOS/serenity/blob/9882848e0bf783dfc8e8a6d887a848d70d9c58f4/Kernel/API/POSIX/net/if.h#L50
6873 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 16,6877 .openbsd, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 16,
6874 .illumos => 32,6878 .illumos => 32,
6875 else => {},6879 else => {},
6876};6880};
...@@ -6921,7 +6925,7 @@ pub const timeval = switch (native_os) {...@@ -6921,7 +6925,7 @@ pub const timeval = switch (native_os) {
6921 sec: c_long,6925 sec: c_long,
6922 usec: c_long,6926 usec: c_long,
6923 },6927 },
6924 .macos, .ios, .tvos, .watchos, .visionos => extern struct {6928 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
6925 sec: c_long,6929 sec: c_long,
6926 usec: i32,6930 usec: i32,
6927 },6931 },
...@@ -6941,7 +6945,7 @@ pub const timeval = switch (native_os) {...@@ -6941,7 +6945,7 @@ pub const timeval = switch (native_os) {
6941pub const timezone = switch (native_os) {6945pub const timezone = switch (native_os) {
6942 .linux => linux.timezone,6946 .linux => linux.timezone,
6943 .emscripten => emscripten.timezone,6947 .emscripten => emscripten.timezone,
6944 .openbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {6948 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
6945 minuteswest: i32,6949 minuteswest: i32,
6946 dsttime: i32,6950 dsttime: i32,
6947 },6951 },
...@@ -6968,7 +6972,7 @@ pub const utsname = switch (native_os) {...@@ -6968,7 +6972,7 @@ pub const utsname = switch (native_os) {
6968 machine: [256:0]u8,6972 machine: [256:0]u8,
6969 domainname: [256:0]u8,6973 domainname: [256:0]u8,
6970 },6974 },
6971 .macos => extern struct {6975 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
6972 sysname: [255:0]u8,6976 sysname: [255:0]u8,
6973 nodename: [255:0]u8,6977 nodename: [255:0]u8,
6974 release: [255:0]u8,6978 release: [255:0]u8,
...@@ -6999,7 +7003,7 @@ pub const _errno = switch (native_os) {...@@ -6999,7 +7003,7 @@ pub const _errno = switch (native_os) {
6999 .emscripten => private.__errno_location,7003 .emscripten => private.__errno_location,
7000 .wasi, .dragonfly => private.errnoFromThreadLocal,7004 .wasi, .dragonfly => private.errnoFromThreadLocal,
7001 .windows => private._errno,7005 .windows => private._errno,
7002 .macos, .ios, .tvos, .watchos, .visionos, .freebsd => private.__error,7006 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd => private.__error,
7003 .illumos => private.___errno,7007 .illumos => private.___errno,
7004 .openbsd, .netbsd => private.__errno,7008 .openbsd, .netbsd => private.__errno,
7005 .haiku => haiku._errnop,7009 .haiku => haiku._errnop,
...@@ -7070,7 +7074,7 @@ pub const RTLD = switch (native_os) {...@@ -7070,7 +7074,7 @@ pub const RTLD = switch (native_os) {
7070 TRACE: bool = false,7074 TRACE: bool = false,
7071 _: u22 = 0,7075 _: u22 = 0,
7072 },7076 },
7073 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {7077 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
7074 LAZY: bool = false,7078 LAZY: bool = false,
7075 NOW: bool = false,7079 NOW: bool = false,
7076 LOCAL: bool = false,7080 LOCAL: bool = false,
...@@ -7102,7 +7106,7 @@ pub const dirent = switch (native_os) {...@@ -7102,7 +7106,7 @@ pub const dirent = switch (native_os) {
7102 type: u8,7106 type: u8,
7103 name: [256]u8,7107 name: [256]u8,
7104 },7108 },
7105 .macos, .ios, .tvos, .watchos, .visionos => extern struct {7109 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
7106 ino: u64,7110 ino: u64,
7107 seekoff: u64,7111 seekoff: u64,
7108 reclen: u16,7112 reclen: u16,
...@@ -7246,7 +7250,7 @@ pub const AI = if (builtin.abi.isAndroid()) packed struct(u32) {...@@ -7246,7 +7250,7 @@ pub const AI = if (builtin.abi.isAndroid()) packed struct(u32) {
7246 ADDRCONFIG: bool = false,7250 ADDRCONFIG: bool = false,
7247 _: u25 = 0,7251 _: u25 = 0,
7248 },7252 },
7249 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {7253 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
7250 PASSIVE: bool = false,7254 PASSIVE: bool = false,
7251 CANONNAME: bool = false,7255 CANONNAME: bool = false,
7252 NUMERICHOST: bool = false,7256 NUMERICHOST: bool = false,
...@@ -7363,7 +7367,7 @@ pub const EAI = if (builtin.abi.isAndroid()) enum(c_int) {...@@ -7363,7 +7367,7 @@ pub const EAI = if (builtin.abi.isAndroid()) enum(c_int) {
73637367
7364 _,7368 _,
7365 },7369 },
7366 .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {7370 .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
7367 /// address family for hostname not supported7371 /// address family for hostname not supported
7368 ADDRFAMILY = 1,7372 ADDRFAMILY = 1,
7369 /// temporary failure in name resolution7373 /// temporary failure in name resolution
...@@ -7697,7 +7701,7 @@ pub const Stat = switch (native_os) {...@@ -7697,7 +7701,7 @@ pub const Stat = switch (native_os) {
7697 };7701 };
7698 }7702 }
7699 },7703 },
7700 .macos, .ios, .tvos, .watchos, .visionos => extern struct {7704 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
7701 dev: i32,7705 dev: i32,
7702 mode: u16,7706 mode: u16,
7703 nlink: u16,7707 nlink: u16,
...@@ -7940,7 +7944,7 @@ pub const pthread_mutex_t = switch (native_os) {...@@ -7940,7 +7944,7 @@ pub const pthread_mutex_t = switch (native_os) {
7940 else => @compileError("unsupported ABI"),7944 else => @compileError("unsupported ABI"),
7941 };7945 };
7942 },7946 },
7943 .macos, .ios, .tvos, .watchos, .visionos => extern struct {7947 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
7944 sig: c_long = 0x32AAABA7,7948 sig: c_long = 0x32AAABA7,
7945 data: [data_len]u8 = [_]u8{0} ** data_len,7949 data: [data_len]u8 = [_]u8{0} ** data_len,
79467950
...@@ -7997,7 +8001,7 @@ pub const pthread_cond_t = switch (native_os) {...@@ -7997,7 +8001,7 @@ pub const pthread_cond_t = switch (native_os) {
7997 .linux => extern struct {8001 .linux => extern struct {
7998 data: [48]u8 align(@alignOf(usize)) = [_]u8{0} ** 48,8002 data: [48]u8 align(@alignOf(usize)) = [_]u8{0} ** 48,
7999 },8003 },
8000 .macos, .ios, .tvos, .watchos, .visionos => extern struct {8004 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
8001 sig: c_long = 0x3CB0B1BB,8005 sig: c_long = 0x3CB0B1BB,
8002 data: [data_len]u8 = [_]u8{0} ** data_len,8006 data: [data_len]u8 = [_]u8{0} ** data_len,
8003 const data_len = if (@sizeOf(usize) == 8) 40 else 24;8007 const data_len = if (@sizeOf(usize) == 8) 40 else 24;
...@@ -8056,7 +8060,7 @@ pub const pthread_rwlock_t = switch (native_os) {...@@ -8056,7 +8060,7 @@ pub const pthread_rwlock_t = switch (native_os) {
8056 data: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56,8060 data: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56,
8057 },8061 },
8058 },8062 },
8059 .macos, .ios, .tvos, .watchos, .visionos => extern struct {8063 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
8060 sig: c_long = 0x2DA8B3B4,8064 sig: c_long = 0x2DA8B3B4,
8061 data: [192]u8 = [_]u8{0} ** 192,8065 data: [192]u8 = [_]u8{0} ** 192,
8062 },8066 },
...@@ -8108,7 +8112,7 @@ pub const pthread_attr_t = switch (native_os) {...@@ -8108,7 +8112,7 @@ pub const pthread_attr_t = switch (native_os) {
8108 __size: [56]u8,8112 __size: [56]u8,
8109 __align: c_long,8113 __align: c_long,
8110 },8114 },
8111 .macos, .ios, .tvos, .watchos, .visionos => extern struct {8115 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
8112 __sig: c_long,8116 __sig: c_long,
8113 __opaque: [56]u8,8117 __opaque: [56]u8,
8114 },8118 },
...@@ -8136,7 +8140,7 @@ pub const pthread_attr_t = switch (native_os) {...@@ -8136,7 +8140,7 @@ pub const pthread_attr_t = switch (native_os) {
81368140
8137pub const pthread_key_t = switch (native_os) {8141pub const pthread_key_t = switch (native_os) {
8138 .linux, .emscripten => c_uint,8142 .linux, .emscripten => c_uint,
8139 .macos, .ios, .tvos, .watchos, .visionos => c_ulong,8143 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_ulong,
8140 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L658144 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L65
8141 .openbsd, .illumos, .serenity => c_int,8145 .openbsd, .illumos, .serenity => c_int,
8142 else => void,8146 else => void,
...@@ -8169,7 +8173,7 @@ pub const sem_t = switch (native_os) {...@@ -8169,7 +8173,7 @@ pub const sem_t = switch (native_os) {
8169 .linux, .emscripten => extern struct {8173 .linux, .emscripten => extern struct {
8170 __size: [4 * @sizeOf(usize)]u8 align(@alignOf(usize)),8174 __size: [4 * @sizeOf(usize)]u8 align(@alignOf(usize)),
8171 },8175 },
8172 .macos, .ios, .tvos, .watchos, .visionos => c_int,8176 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_int,
8173 .freebsd => extern struct {8177 .freebsd => extern struct {
8174 _magic: u32,8178 _magic: u32,
8175 _kern: extern struct {8179 _kern: extern struct {
...@@ -8213,7 +8217,7 @@ pub const Kevent = switch (native_os) {...@@ -8213,7 +8217,7 @@ pub const Kevent = switch (native_os) {
8213 data: i64,8217 data: i64,
8214 udata: usize,8218 udata: usize,
8215 },8219 },
8216 .macos, .ios, .tvos, .watchos, .visionos => extern struct {8220 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
8217 ident: usize,8221 ident: usize,
8218 filter: i16,8222 filter: i16,
8219 flags: u16,8223 flags: u16,
...@@ -8293,7 +8297,7 @@ pub const AT = switch (native_os) {...@@ -8293,7 +8297,7 @@ pub const AT = switch (native_os) {
8293 /// Remove directory instead of unlinking file8297 /// Remove directory instead of unlinking file
8294 pub const REMOVEDIR = 0x200;8298 pub const REMOVEDIR = 0x200;
8295 },8299 },
8296 .macos, .ios, .tvos, .watchos, .visionos => struct {8300 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
8297 pub const FDCWD = -2;8301 pub const FDCWD = -2;
8298 /// Use effective ids in access check8302 /// Use effective ids in access check
8299 pub const EACCESS = 0x0010;8303 pub const EACCESS = 0x0010;
...@@ -8548,7 +8552,7 @@ pub const O = switch (native_os) {...@@ -8548,7 +8552,7 @@ pub const O = switch (native_os) {
8548 DIRECTORY: bool = false,8552 DIRECTORY: bool = false,
8549 _: u10 = 0,8553 _: u10 = 0,
8550 },8554 },
8551 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {8555 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
8552 ACCMODE: std.posix.ACCMODE = .RDONLY,8556 ACCMODE: std.posix.ACCMODE = .RDONLY,
8553 NONBLOCK: bool = false,8557 NONBLOCK: bool = false,
8554 APPEND: bool = false,8558 APPEND: bool = false,
...@@ -8727,7 +8731,7 @@ pub const MAP = switch (native_os) {...@@ -8727,7 +8731,7 @@ pub const MAP = switch (native_os) {
8727 NORESERVE: bool = false,8731 NORESERVE: bool = false,
8728 _: u27 = 0,8732 _: u27 = 0,
8729 },8733 },
8730 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {8734 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
8731 TYPE: enum(u4) {8735 TYPE: enum(u4) {
8732 SHARED = 0x01,8736 SHARED = 0x01,
8733 PRIVATE = 0x02,8737 PRIVATE = 0x02,
...@@ -8812,7 +8816,7 @@ pub const cc_t = u8;...@@ -8812,7 +8816,7 @@ pub const cc_t = u8;
8812/// Indices into the `cc` array in the `termios` struct.8816/// Indices into the `cc` array in the `termios` struct.
8813pub const V = switch (native_os) {8817pub const V = switch (native_os) {
8814 .linux => linux.V,8818 .linux => linux.V,
8815 .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .openbsd => enum {8819 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .netbsd, .openbsd => enum {
8816 EOF,8820 EOF,
8817 EOL,8821 EOL,
8818 EOL2,8822 EOL2,
...@@ -8932,7 +8936,7 @@ pub const V = switch (native_os) {...@@ -8932,7 +8936,7 @@ pub const V = switch (native_os) {
89328936
8933pub const NCCS = switch (native_os) {8937pub const NCCS = switch (native_os) {
8934 .linux => linux.NCCS,8938 .linux => linux.NCCS,
8935 .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,8939 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
8936 .haiku => 11,8940 .haiku => 11,
8937 .illumos => 19,8941 .illumos => 19,
8938 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L158942 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L15
...@@ -8942,7 +8946,7 @@ pub const NCCS = switch (native_os) {...@@ -8942,7 +8946,7 @@ pub const NCCS = switch (native_os) {
89428946
8943pub const termios = switch (native_os) {8947pub const termios = switch (native_os) {
8944 .linux => linux.termios,8948 .linux => linux.termios,
8945 .macos, .ios, .tvos, .watchos, .visionos => extern struct {8949 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
8946 iflag: tc_iflag_t,8950 iflag: tc_iflag_t,
8947 oflag: tc_oflag_t,8951 oflag: tc_oflag_t,
8948 cflag: tc_cflag_t,8952 cflag: tc_cflag_t,
...@@ -8993,7 +8997,7 @@ pub const termios = switch (native_os) {...@@ -8993,7 +8997,7 @@ pub const termios = switch (native_os) {
89938997
8994pub const tc_iflag_t = switch (native_os) {8998pub const tc_iflag_t = switch (native_os) {
8995 .linux => linux.tc_iflag_t,8999 .linux => linux.tc_iflag_t,
8996 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {9000 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
8997 IGNBRK: bool = false,9001 IGNBRK: bool = false,
8998 BRKINT: bool = false,9002 BRKINT: bool = false,
8999 IGNPAR: bool = false,9003 IGNPAR: bool = false,
...@@ -9104,7 +9108,7 @@ pub const tc_iflag_t = switch (native_os) {...@@ -9104,7 +9108,7 @@ pub const tc_iflag_t = switch (native_os) {
91049108
9105pub const tc_oflag_t = switch (native_os) {9109pub const tc_oflag_t = switch (native_os) {
9106 .linux => linux.tc_oflag_t,9110 .linux => linux.tc_oflag_t,
9107 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {9111 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
9108 OPOST: bool = false,9112 OPOST: bool = false,
9109 ONLCR: bool = false,9113 ONLCR: bool = false,
9110 OXTABS: bool = false,9114 OXTABS: bool = false,
...@@ -9202,7 +9206,7 @@ pub const CSIZE = switch (native_os) {...@@ -9202,7 +9206,7 @@ pub const CSIZE = switch (native_os) {
92029206
9203pub const tc_cflag_t = switch (native_os) {9207pub const tc_cflag_t = switch (native_os) {
9204 .linux => linux.tc_cflag_t,9208 .linux => linux.tc_cflag_t,
9205 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {9209 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
9206 CIGNORE: bool = false,9210 CIGNORE: bool = false,
9207 _1: u5 = 0,9211 _1: u5 = 0,
9208 CSTOPB: bool = false,9212 CSTOPB: bool = false,
...@@ -9351,7 +9355,7 @@ pub const tc_cflag_t = switch (native_os) {...@@ -9351,7 +9355,7 @@ pub const tc_cflag_t = switch (native_os) {
93519355
9352pub const tc_lflag_t = switch (native_os) {9356pub const tc_lflag_t = switch (native_os) {
9353 .linux => linux.tc_lflag_t,9357 .linux => linux.tc_lflag_t,
9354 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {9358 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
9355 ECHOKE: bool = false,9359 ECHOKE: bool = false,
9356 ECHOE: bool = false,9360 ECHOE: bool = false,
9357 ECHOK: bool = false,9361 ECHOK: bool = false,
...@@ -9498,7 +9502,7 @@ pub const tc_lflag_t = switch (native_os) {...@@ -9498,7 +9502,7 @@ pub const tc_lflag_t = switch (native_os) {
94989502
9499pub const speed_t = switch (native_os) {9503pub const speed_t = switch (native_os) {
9500 .linux => linux.speed_t,9504 .linux => linux.speed_t,
9501 .macos, .ios, .tvos, .watchos, .visionos, .openbsd => enum(u64) {9505 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .openbsd => enum(u64) {
9502 B0 = 0,9506 B0 = 0,
9503 B50 = 50,9507 B50 = 50,
9504 B75 = 75,9508 B75 = 75,
...@@ -9693,7 +9697,7 @@ pub const NSIG = switch (native_os) {...@@ -9693,7 +9697,7 @@ pub const NSIG = switch (native_os) {
9693 .windows => 23,9697 .windows => 23,
9694 .haiku => 65,9698 .haiku => 65,
9695 .netbsd, .freebsd => 32,9699 .netbsd, .freebsd => 32,
9696 .macos => darwin.NSIG,9700 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.NSIG,
9697 .illumos => 75,9701 .illumos => 75,
9698 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L429702 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42
9699 .openbsd, .serenity => 33,9703 .openbsd, .serenity => 33,
...@@ -9701,7 +9705,7 @@ pub const NSIG = switch (native_os) {...@@ -9701,7 +9705,7 @@ pub const NSIG = switch (native_os) {
9701};9705};
97029706
9703pub const MINSIGSTKSZ = switch (native_os) {9707pub const MINSIGSTKSZ = switch (native_os) {
9704 .macos, .ios, .tvos, .watchos, .visionos => 32768,9708 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 32768,
9705 .freebsd => switch (builtin.cpu.arch) {9709 .freebsd => switch (builtin.cpu.arch) {
9706 .powerpc64, .powerpc64le, .x86, .x86_64 => 2048,9710 .powerpc64, .powerpc64le, .x86, .x86_64 => 2048,
9707 .arm, .aarch64, .riscv64 => 4096,9711 .arm, .aarch64, .riscv64 => 4096,
...@@ -9715,7 +9719,7 @@ pub const MINSIGSTKSZ = switch (native_os) {...@@ -9715,7 +9719,7 @@ pub const MINSIGSTKSZ = switch (native_os) {
9715 else => {},9719 else => {},
9716};9720};
9717pub const SIGSTKSZ = switch (native_os) {9721pub const SIGSTKSZ = switch (native_os) {
9718 .macos, .ios, .tvos, .watchos, .visionos => 131072,9722 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 131072,
9719 .netbsd, .freebsd => MINSIGSTKSZ + 32768,9723 .netbsd, .freebsd => MINSIGSTKSZ + 32768,
9720 .illumos => 8192,9724 .illumos => 8192,
9721 .haiku => 16384,9725 .haiku => 16384,
...@@ -9726,7 +9730,7 @@ pub const SIGSTKSZ = switch (native_os) {...@@ -9726,7 +9730,7 @@ pub const SIGSTKSZ = switch (native_os) {
9726};9730};
9727pub const SS = switch (native_os) {9731pub const SS = switch (native_os) {
9728 .linux => linux.SS,9732 .linux => linux.SS,
9729 .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd => struct {9733 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .netbsd, .freebsd => struct {
9730 pub const ONSTACK = 1;9734 pub const ONSTACK = 1;
9731 pub const DISABLE = 4;9735 pub const DISABLE = 4;
9732 },9736 },
...@@ -9739,7 +9743,7 @@ pub const SS = switch (native_os) {...@@ -9739,7 +9743,7 @@ pub const SS = switch (native_os) {
9739};9743};
97409744
9741pub const EV = switch (native_os) {9745pub const EV = switch (native_os) {
9742 .macos, .ios, .tvos, .watchos, .visionos => struct {9746 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
9743 /// add event to kq (implies enable)9747 /// add event to kq (implies enable)
9744 pub const ADD = 0x0001;9748 pub const ADD = 0x0001;
9745 /// delete event from kq9749 /// delete event from kq
...@@ -9879,7 +9883,7 @@ pub const EV = switch (native_os) {...@@ -9879,7 +9883,7 @@ pub const EV = switch (native_os) {
9879};9883};
98809884
9881pub const EVFILT = switch (native_os) {9885pub const EVFILT = switch (native_os) {
9882 .macos, .ios, .tvos, .watchos, .visionos => struct {9886 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
9883 pub const READ = -1;9887 pub const READ = -1;
9884 pub const WRITE = -2;9888 pub const WRITE = -2;
9885 /// attached to aio requests9889 /// attached to aio requests
...@@ -10002,7 +10006,7 @@ pub const EVFILT = switch (native_os) {...@@ -10002,7 +10006,7 @@ pub const EVFILT = switch (native_os) {
10002};10006};
1000310007
10004pub const NOTE = switch (native_os) {10008pub const NOTE = switch (native_os) {
10005 .macos, .ios, .tvos, .watchos, .visionos => struct {10009 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
10006 /// On input, TRIGGER causes the event to be triggered for output.10010 /// On input, TRIGGER causes the event to be triggered for output.
10007 pub const TRIGGER = 0x01000000;10011 pub const TRIGGER = 0x01000000;
10008 /// ignore input fflags10012 /// ignore input fflags
...@@ -10293,7 +10297,7 @@ pub extern "c" fn sigwait(set: ?*sigset_t, sig: ?*c_int) c_int;...@@ -10293,7 +10297,7 @@ pub extern "c" fn sigwait(set: ?*sigset_t, sig: ?*c_int) c_int;
10293pub extern "c" fn alarm(seconds: c_uint) c_uint;10297pub extern "c" fn alarm(seconds: c_uint) c_uint;
1029410298
10295pub const close = switch (native_os) {10299pub const close = switch (native_os) {
10296 .macos, .ios, .tvos, .watchos, .visionos => darwin.@"close$NOCANCEL",10300 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.@"close$NOCANCEL",
10297 else => private.close,10301 else => private.close,
10298};10302};
1029910303
...@@ -10308,7 +10312,7 @@ pub const clock_gettime = switch (native_os) {...@@ -10308,7 +10312,7 @@ pub const clock_gettime = switch (native_os) {
10308};10312};
1030910313
10310pub const fstat = switch (native_os) {10314pub const fstat = switch (native_os) {
10311 .macos => switch (native_arch) {10315 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
10312 .x86_64 => private.@"fstat$INODE64",10316 .x86_64 => private.@"fstat$INODE64",
10313 else => private.fstat,10317 else => private.fstat,
10314 },10318 },
...@@ -10317,7 +10321,7 @@ pub const fstat = switch (native_os) {...@@ -10317,7 +10321,7 @@ pub const fstat = switch (native_os) {
10317};10321};
1031810322
10319pub const fstatat = switch (native_os) {10323pub const fstatat = switch (native_os) {
10320 .macos => switch (native_arch) {10324 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
10321 .x86_64 => private.@"fstatat$INODE64",10325 .x86_64 => private.@"fstatat$INODE64",
10322 else => private.fstatat,10326 else => private.fstatat,
10323 },10327 },
...@@ -10351,7 +10355,7 @@ pub extern "c" fn setrlimit64(resource: rlimit_resource, rlim: *const rlimit) c_...@@ -10351,7 +10355,7 @@ pub extern "c" fn setrlimit64(resource: rlimit_resource, rlim: *const rlimit) c_
1035110355
10352pub const arc4random_buf = switch (native_os) {10356pub const arc4random_buf = switch (native_os) {
10353 .linux => if (builtin.abi.isAndroid()) private.arc4random_buf else {},10357 .linux => if (builtin.abi.isAndroid()) private.arc4random_buf else {},
10354 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .serenity, .macos, .ios, .tvos, .watchos, .visionos => private.arc4random_buf,10358 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .serenity, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.arc4random_buf,
10355 else => {},10359 else => {},
10356};10360};
10357pub const getentropy = switch (native_os) {10361pub const getentropy = switch (native_os) {
...@@ -10404,7 +10408,7 @@ pub extern "c" fn ftruncate64(fd: c_int, length: off_t) c_int;...@@ -10404,7 +10408,7 @@ pub extern "c" fn ftruncate64(fd: c_int, length: off_t) c_int;
10404pub extern "c" fn fallocate(fd: fd_t, mode: c_int, offset: off_t, len: off_t) c_int;10408pub extern "c" fn fallocate(fd: fd_t, mode: c_int, offset: off_t, len: off_t) c_int;
10405pub const sendfile = switch (native_os) {10409pub const sendfile = switch (native_os) {
10406 .freebsd => freebsd.sendfile,10410 .freebsd => freebsd.sendfile,
10407 .macos, .ios, .tvos, .watchos, .visionos => darwin.sendfile,10411 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.sendfile,
10408 .linux => private.sendfile,10412 .linux => private.sendfile,
10409 else => {},10413 else => {},
10410};10414};
...@@ -10445,7 +10449,7 @@ pub extern "c" fn madvise(...@@ -10445,7 +10449,7 @@ pub extern "c" fn madvise(
10445) c_int;10449) c_int;
1044610450
10447pub const getdirentries = switch (native_os) {10451pub const getdirentries = switch (native_os) {
10448 .macos, .ios, .tvos, .watchos, .visionos => private.__getdirentries64,10452 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.__getdirentries64,
10449 else => private.getdirentries,10453 else => private.getdirentries,
10450};10454};
1045110455
...@@ -10500,7 +10504,7 @@ pub const nanosleep = switch (native_os) {...@@ -10500,7 +10504,7 @@ pub const nanosleep = switch (native_os) {
10500};10504};
1050110505
10502pub const readdir = switch (native_os) {10506pub const readdir = switch (native_os) {
10503 .macos => switch (native_arch) {10507 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
10504 .x86_64 => private.@"readdir$INODE64",10508 .x86_64 => private.@"readdir$INODE64",
10505 else => private.readdir,10509 else => private.readdir,
10506 },10510 },
...@@ -10509,7 +10513,7 @@ pub const readdir = switch (native_os) {...@@ -10509,7 +10513,7 @@ pub const readdir = switch (native_os) {
10509};10513};
1051010514
10511pub const realpath = switch (native_os) {10515pub const realpath = switch (native_os) {
10512 .macos, .ios, .tvos, .watchos, .visionos => private.@"realpath$DARWIN_EXTSN",10516 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.@"realpath$DARWIN_EXTSN",
10513 else => private.realpath,10517 else => private.realpath,
10514};10518};
1051510519
...@@ -10573,7 +10577,7 @@ pub const socketpair = switch (native_os) {...@@ -10573,7 +10577,7 @@ pub const socketpair = switch (native_os) {
10573};10577};
1057410578
10575pub const stat = switch (native_os) {10579pub const stat = switch (native_os) {
10576 .macos => switch (native_arch) {10580 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
10577 .x86_64 => private.@"stat$INODE64",10581 .x86_64 => private.@"stat$INODE64",
10578 else => private.stat,10582 else => private.stat,
10579 },10583 },
...@@ -10585,7 +10589,7 @@ pub const _msize = switch (native_os) {...@@ -10585,7 +10589,7 @@ pub const _msize = switch (native_os) {
10585 else => {},10589 else => {},
10586};10590};
10587pub const malloc_size = switch (native_os) {10591pub const malloc_size = switch (native_os) {
10588 .macos, .ios, .tvos, .watchos, .visionos, .serenity => private.malloc_size,10592 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => private.malloc_size,
10589 else => {},10593 else => {},
10590};10594};
10591pub const malloc_usable_size = switch (native_os) {10595pub const malloc_usable_size = switch (native_os) {
...@@ -10593,7 +10597,7 @@ pub const malloc_usable_size = switch (native_os) {...@@ -10593,7 +10597,7 @@ pub const malloc_usable_size = switch (native_os) {
10593 else => {},10597 else => {},
10594};10598};
10595pub const posix_memalign = switch (native_os) {10599pub const posix_memalign = switch (native_os) {
10596 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => private.posix_memalign,10600 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => private.posix_memalign,
10597 else => {},10601 else => {},
10598};10602};
10599pub const sysconf = switch (native_os) {10603pub const sysconf = switch (native_os) {
...@@ -10602,7 +10606,7 @@ pub const sysconf = switch (native_os) {...@@ -10602,7 +10606,7 @@ pub const sysconf = switch (native_os) {
10602};10606};
1060310607
10604pub const sf_hdtr = switch (native_os) {10608pub const sf_hdtr = switch (native_os) {
10605 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {10609 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
10606 headers: ?[*]const iovec_const,10610 headers: ?[*]const iovec_const,
10607 hdr_cnt: c_int,10611 hdr_cnt: c_int,
10608 trailers: ?[*]const iovec_const,10612 trailers: ?[*]const iovec_const,
...@@ -10661,15 +10665,17 @@ pub extern "c" fn wait4(pid: pid_t, status: ?*c_int, options: c_int, ru: ?*rusag...@@ -10661,15 +10665,17 @@ pub extern "c" fn wait4(pid: pid_t, status: ?*c_int, options: c_int, ru: ?*rusag
10661pub const fork = switch (native_os) {10665pub const fork = switch (native_os) {
10662 .dragonfly,10666 .dragonfly,
10663 .freebsd,10667 .freebsd,
10664 .ios,
10665 .linux,10668 .linux,
10669 .driverkit,
10670 .ios,
10671 .maccatalyst,
10666 .macos,10672 .macos,
10673 .tvos,
10674 .visionos,
10675 .watchos,
10667 .netbsd,10676 .netbsd,
10668 .openbsd,10677 .openbsd,
10669 .illumos,10678 .illumos,
10670 .tvos,
10671 .watchos,
10672 .visionos,
10673 .haiku,10679 .haiku,
10674 .serenity,10680 .serenity,
10675 => private.fork,10681 => private.fork,
...@@ -10813,7 +10819,7 @@ pub extern "c" fn pthread_getspecific(key: pthread_key_t) ?*anyopaque;...@@ -10813,7 +10819,7 @@ pub extern "c" fn pthread_getspecific(key: pthread_key_t) ?*anyopaque;
10813pub extern "c" fn pthread_setspecific(key: pthread_key_t, value: ?*anyopaque) c_int;10819pub extern "c" fn pthread_setspecific(key: pthread_key_t, value: ?*anyopaque) c_int;
10814pub extern "c" fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *sigset_t) c_int;10820pub extern "c" fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *sigset_t) c_int;
10815pub const pthread_setname_np = switch (native_os) {10821pub const pthread_setname_np = switch (native_os) {
10816 .macos, .ios, .tvos, .watchos, .visionos => darwin.pthread_setname_np,10822 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.pthread_setname_np,
10817 .illumos => illumos.pthread_setname_np,10823 .illumos => illumos.pthread_setname_np,
10818 .netbsd => netbsd.pthread_setname_np,10824 .netbsd => netbsd.pthread_setname_np,
10819 else => private.pthread_setname_np,10825 else => private.pthread_setname_np,
...@@ -10823,7 +10829,7 @@ pub extern "c" fn pthread_getname_np(thread: pthread_t, name: [*:0]u8, len: usiz...@@ -10823,7 +10829,7 @@ pub extern "c" fn pthread_getname_np(thread: pthread_t, name: [*:0]u8, len: usiz
10823pub extern "c" fn pthread_kill(pthread_t, signal: SIG) c_int;10829pub extern "c" fn pthread_kill(pthread_t, signal: SIG) c_int;
1082410830
10825pub const pthread_threadid_np = switch (native_os) {10831pub const pthread_threadid_np = switch (native_os) {
10826 .macos, .ios, .tvos, .watchos, .visionos => private.pthread_threadid_np,10832 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.pthread_threadid_np,
10827 else => {},10833 else => {},
10828};10834};
1082910835
...@@ -10831,7 +10837,7 @@ pub const caddr_t = ?[*]u8;...@@ -10831,7 +10837,7 @@ pub const caddr_t = ?[*]u8;
1083110837
10832pub const ptrace = switch (native_os) {10838pub const ptrace = switch (native_os) {
10833 .linux, .serenity => private.ptrace,10839 .linux, .serenity => private.ptrace,
10834 .macos, .ios, .tvos, .watchos, .visionos => darwin.ptrace,10840 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.ptrace,
10835 .dragonfly => dragonfly.ptrace,10841 .dragonfly => dragonfly.ptrace,
10836 .freebsd => freebsd.ptrace,10842 .freebsd => freebsd.ptrace,
10837 .netbsd => netbsd.ptrace,10843 .netbsd => netbsd.ptrace,
...@@ -10850,7 +10856,7 @@ pub extern "c" fn sem_timedwait(sem: *sem_t, abs_timeout: *const timespec) c_int...@@ -10850,7 +10856,7 @@ pub extern "c" fn sem_timedwait(sem: *sem_t, abs_timeout: *const timespec) c_int
10850pub extern "c" fn sem_getvalue(sem: *sem_t, sval: *c_int) c_int;10856pub extern "c" fn sem_getvalue(sem: *sem_t, sval: *c_int) c_int;
1085110857
10852pub const shm_open = switch (native_os) {10858pub const shm_open = switch (native_os) {
10853 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => darwin.shm_open,10859 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.shm_open,
10854 else => private.shm_open,10860 else => private.shm_open,
10855};10861};
10856pub extern "c" fn shm_unlink(name: [*:0]const u8) c_int;10862pub extern "c" fn shm_unlink(name: [*:0]const u8) c_int;
lib/std/crypto/Certificate/Bundle.zig+1-1
...@@ -73,7 +73,7 @@ pub const RescanError = RescanLinuxError || RescanMacError || RescanWithPathErro...@@ -73,7 +73,7 @@ pub const RescanError = RescanLinuxError || RescanMacError || RescanWithPathErro
73pub fn rescan(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanError!void {73pub fn rescan(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanError!void {
74 switch (builtin.os.tag) {74 switch (builtin.os.tag) {
75 .linux => return rescanLinux(cb, gpa, io, now),75 .linux => return rescanLinux(cb, gpa, io, now),
76 .macos => return rescanMac(cb, gpa, io, now),76 .maccatalyst, .macos => return rescanMac(cb, gpa, io, now),
77 .freebsd, .openbsd => return rescanWithPath(cb, gpa, io, now, "/etc/ssl/cert.pem"),77 .freebsd, .openbsd => return rescanWithPath(cb, gpa, io, now, "/etc/ssl/cert.pem"),
78 .netbsd => return rescanWithPath(cb, gpa, io, now, "/etc/openssl/certs/ca-certificates.crt"),78 .netbsd => return rescanWithPath(cb, gpa, io, now, "/etc/openssl/certs/ca-certificates.crt"),
79 .dragonfly => return rescanWithPath(cb, gpa, io, now, "/usr/local/etc/ssl/cert.pem"),79 .dragonfly => return rescanWithPath(cb, gpa, io, now, "/usr/local/etc/ssl/cert.pem"),
lib/std/debug.zig+2
...@@ -1392,6 +1392,7 @@ pub const have_segfault_handling_support = switch (native_os) {...@@ -1392,6 +1392,7 @@ pub const have_segfault_handling_support = switch (native_os) {
13921392
1393 .driverkit,1393 .driverkit,
1394 .ios,1394 .ios,
1395 .maccatalyst,
1395 .macos,1396 .macos,
1396 .tvos,1397 .tvos,
1397 .visionos,1398 .visionos,
...@@ -1487,6 +1488,7 @@ fn handleSegfaultPosix(sig: posix.SIG, info: *const posix.siginfo_t, ctx_ptr: ?*...@@ -1487,6 +1488,7 @@ fn handleSegfaultPosix(sig: posix.SIG, info: *const posix.siginfo_t, ctx_ptr: ?*
1487 .freebsd,1488 .freebsd,
1488 .driverkit,1489 .driverkit,
1489 .ios,1490 .ios,
1491 .maccatalyst,
1490 .macos,1492 .macos,
1491 .tvos,1493 .tvos,
1492 .visionos,1494 .visionos,
lib/std/debug/cpu_context.zig+1-1
...@@ -2131,7 +2131,7 @@ const signal_ucontext_t = switch (native_os) {...@@ -2131,7 +2131,7 @@ const signal_ucontext_t = switch (native_os) {
2131 },2131 },
2132 },2132 },
2133 // https://github.com/ziglang/zig/blob/60be67d3c0ba6ae15fa7115596734ab1e74fbcd3/lib/libc/include/any-macos-any/sys/_types/_ucontext.h2133 // https://github.com/ziglang/zig/blob/60be67d3c0ba6ae15fa7115596734ab1e74fbcd3/lib/libc/include/any-macos-any/sys/_types/_ucontext.h
2134 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => extern struct {2134 .driverkit, .ios, .maccatalyst, .macos, .tvos, .watchos, .visionos => extern struct {
2135 _onstack: i32,2135 _onstack: i32,
2136 _sigmask: std.c.sigset_t,2136 _sigmask: std.c.sigset_t,
2137 _stack: std.c.stack_t,2137 _stack: std.c.stack_t,
lib/std/dynamic_library.zig+2-2
...@@ -16,7 +16,7 @@ pub const DynLib = struct {...@@ -16,7 +16,7 @@ pub const DynLib = struct {
16 else16 else
17 DlDynLib,17 DlDynLib,
18 .windows => WindowsDynLib,18 .windows => WindowsDynLib,
19 .macos, .tvos, .watchos, .ios, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly, .illumos => DlDynLib,19 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly, .illumos => DlDynLib,
20 else => struct {20 else => struct {
21 const open = @compileError("unsupported platform");21 const open = @compileError("unsupported platform");
22 const openZ = @compileError("unsupported platform");22 const openZ = @compileError("unsupported platform");
...@@ -675,7 +675,7 @@ test "dynamic_library" {...@@ -675,7 +675,7 @@ test "dynamic_library" {
675 const libname = switch (native_os) {675 const libname = switch (native_os) {
676 .linux, .freebsd, .openbsd, .illumos => "invalid_so.so",676 .linux, .freebsd, .openbsd, .illumos => "invalid_so.so",
677 .windows => "invalid_dll.dll",677 .windows => "invalid_dll.dll",
678 .macos, .tvos, .watchos, .ios, .visionos => "invalid_dylib.dylib",678 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => "invalid_dylib.dylib",
679 else => return error.SkipZigTest,679 else => return error.SkipZigTest,
680 };680 };
681681
lib/std/fs.zig+2-2
...@@ -52,7 +52,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE...@@ -52,7 +52,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE
52/// * On other platforms, `[]u8` file paths are opaque sequences of bytes with52/// * On other platforms, `[]u8` file paths are opaque sequences of bytes with
53/// no particular encoding.53/// no particular encoding.
54pub const max_path_bytes = switch (native_os) {54pub const max_path_bytes = switch (native_os) {
55 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .illumos, .plan9, .emscripten, .wasi, .serenity => posix.PATH_MAX,55 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .illumos, .plan9, .emscripten, .wasi, .serenity => posix.PATH_MAX,
56 // Each WTF-16LE code unit may be expanded to 3 WTF-8 bytes.56 // Each WTF-16LE code unit may be expanded to 3 WTF-8 bytes.
57 // If it would require 4 WTF-8 bytes, then there would be a surrogate57 // If it would require 4 WTF-8 bytes, then there would be a surrogate
58 // pair in the WTF-16LE, and we (over)account 3 bytes for it that way.58 // pair in the WTF-16LE, and we (over)account 3 bytes for it that way.
...@@ -73,7 +73,7 @@ pub const max_path_bytes = switch (native_os) {...@@ -73,7 +73,7 @@ pub const max_path_bytes = switch (native_os) {
73/// On WASI, file name components are encoded as valid UTF-8.73/// On WASI, file name components are encoded as valid UTF-8.
74/// On other platforms, `[]u8` components are an opaque sequence of bytes with no particular encoding.74/// On other platforms, `[]u8` components are an opaque sequence of bytes with no particular encoding.
75pub const max_name_bytes = switch (native_os) {75pub const max_name_bytes = switch (native_os) {
76 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity => posix.NAME_MAX,76 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity => posix.NAME_MAX,
77 // Haiku's NAME_MAX includes the null terminator, so subtract one.77 // Haiku's NAME_MAX includes the null terminator, so subtract one.
78 .haiku => posix.NAME_MAX - 1,78 .haiku => posix.NAME_MAX - 1,
79 // Each WTF-16LE character may be expanded to 3 WTF-8 bytes.79 // Each WTF-16LE character may be expanded to 3 WTF-8 bytes.
lib/std/fs/Dir.zig+9-4
...@@ -39,7 +39,7 @@ const IteratorError = error{...@@ -39,7 +39,7 @@ const IteratorError = error{
39} || posix.UnexpectedError;39} || posix.UnexpectedError;
4040
41pub const Iterator = switch (native_os) {41pub const Iterator = switch (native_os) {
42 .macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => struct {42 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => struct {
43 dir: Dir,43 dir: Dir,
44 seek: i64,44 seek: i64,
45 buf: [1024]u8 align(@alignOf(posix.system.dirent)),45 buf: [1024]u8 align(@alignOf(posix.system.dirent)),
...@@ -55,7 +55,7 @@ pub const Iterator = switch (native_os) {...@@ -55,7 +55,7 @@ pub const Iterator = switch (native_os) {
55 /// with subsequent calls to `next`, as well as when this `Dir` is deinitialized.55 /// with subsequent calls to `next`, as well as when this `Dir` is deinitialized.
56 pub fn next(self: *Self) Error!?Entry {56 pub fn next(self: *Self) Error!?Entry {
57 switch (native_os) {57 switch (native_os) {
58 .macos, .ios => return self.nextDarwin(),58 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => return self.nextDarwin(),
59 .freebsd, .netbsd, .dragonfly, .openbsd => return self.nextBsd(),59 .freebsd, .netbsd, .dragonfly, .openbsd => return self.nextBsd(),
60 .illumos => return self.nextIllumos(),60 .illumos => return self.nextIllumos(),
61 else => @compileError("unimplemented"),61 else => @compileError("unimplemented"),
...@@ -612,8 +612,13 @@ pub fn iterateAssumeFirstIteration(self: Dir) Iterator {...@@ -612,8 +612,13 @@ pub fn iterateAssumeFirstIteration(self: Dir) Iterator {
612612
613fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator {613fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator {
614 switch (native_os) {614 switch (native_os) {
615 .macos,615 .driverkit,
616 .ios,616 .ios,
617 .maccatalyst,
618 .macos,
619 .tvos,
620 .visionos,
621 .watchos,
617 .freebsd,622 .freebsd,
618 .netbsd,623 .netbsd,
619 .dragonfly,624 .dragonfly,
...@@ -1103,7 +1108,7 @@ pub fn deleteFileZ(self: Dir, sub_path_c: [*:0]const u8) DeleteFileError!void {...@@ -1103,7 +1108,7 @@ pub fn deleteFileZ(self: Dir, sub_path_c: [*:0]const u8) DeleteFileError!void {
1103 error.AccessDenied, error.PermissionDenied => |e| switch (native_os) {1108 error.AccessDenied, error.PermissionDenied => |e| switch (native_os) {
1104 // non-Linux POSIX systems return permission errors when trying to delete a1109 // non-Linux POSIX systems return permission errors when trying to delete a
1105 // directory, so we need to handle that case specifically and translate the error1110 // directory, so we need to handle that case specifically and translate the error
1106 .macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => {1111 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => {
1107 // Don't follow symlinks to match unlinkat (which acts on symlinks rather than follows them)1112 // Don't follow symlinks to match unlinkat (which acts on symlinks rather than follows them)
1108 const fstat = posix.fstatatZ(self.fd, sub_path_c, posix.AT.SYMLINK_NOFOLLOW) catch return e;1113 const fstat = posix.fstatatZ(self.fd, sub_path_c, posix.AT.SYMLINK_NOFOLLOW) catch return e;
1109 const is_dir = fstat.mode & posix.S.IFMT == posix.S.IFDIR;1114 const is_dir = fstat.mode & posix.S.IFMT == posix.S.IFDIR;
lib/std/fs/get_app_data_dir.zig+1-1
...@@ -23,7 +23,7 @@ pub fn getAppDataDir(allocator: mem.Allocator, appname: []const u8) GetAppDataDi...@@ -23,7 +23,7 @@ pub fn getAppDataDir(allocator: mem.Allocator, appname: []const u8) GetAppDataDi
23 defer allocator.free(local_app_data_dir);23 defer allocator.free(local_app_data_dir);
24 return fs.path.join(allocator, &[_][]const u8{ local_app_data_dir, appname });24 return fs.path.join(allocator, &[_][]const u8{ local_app_data_dir, appname });
25 },25 },
26 .macos => {26 .maccatalyst, .macos => {
27 const home_dir = posix.getenv("HOME") orelse {27 const home_dir = posix.getenv("HOME") orelse {
28 // TODO look in /etc/passwd28 // TODO look in /etc/passwd
29 return error.AppDataDirUnavailable;29 return error.AppDataDirUnavailable;
lib/std/heap.zig+4-4
...@@ -83,7 +83,7 @@ pub fn defaultQueryPageSize() usize {...@@ -83,7 +83,7 @@ pub fn defaultQueryPageSize() usize {
83 @max(std.c.sysconf(@intFromEnum(std.c._SC.PAGESIZE)), 0)83 @max(std.c.sysconf(@intFromEnum(std.c._SC.PAGESIZE)), 0)
84 else84 else
85 std.os.linux.getauxval(std.elf.AT_PAGESZ),85 std.os.linux.getauxval(std.elf.AT_PAGESZ),
86 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {86 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
87 const task_port = std.c.mach_task_self();87 const task_port = std.c.mach_task_self();
88 // mach_task_self may fail "if there are any resource failures or other errors".88 // mach_task_self may fail "if there are any resource failures or other errors".
89 if (task_port == std.c.TASK.NULL) break :size 0;89 if (task_port == std.c.TASK.NULL) break :size 0;
...@@ -155,7 +155,7 @@ const CAllocator = struct {...@@ -155,7 +155,7 @@ const CAllocator = struct {
155 else {};155 else {};
156156
157 pub const supports_posix_memalign = switch (builtin.os.tag) {157 pub const supports_posix_memalign = switch (builtin.os.tag) {
158 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true,158 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => true,
159 else => false,159 else => false,
160 };160 };
161161
...@@ -703,7 +703,7 @@ pub fn testAllocatorAlignedShrink(base_allocator: mem.Allocator) !void {...@@ -703,7 +703,7 @@ pub fn testAllocatorAlignedShrink(base_allocator: mem.Allocator) !void {
703}703}
704704
705const page_size_min_default: ?usize = switch (builtin.os.tag) {705const page_size_min_default: ?usize = switch (builtin.os.tag) {
706 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {706 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
707 .x86_64 => 4 << 10,707 .x86_64 => 4 << 10,
708 .aarch64 => 16 << 10,708 .aarch64 => 16 << 10,
709 else => null,709 else => null,
...@@ -862,7 +862,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {...@@ -862,7 +862,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {
862};862};
863863
864const page_size_max_default: ?usize = switch (builtin.os.tag) {864const page_size_max_default: ?usize = switch (builtin.os.tag) {
865 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {865 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
866 .x86_64 => 4 << 10,866 .x86_64 => 4 << 10,
867 .aarch64 => 16 << 10,867 .aarch64 => 16 << 10,
868 else => null,868 else => null,
lib/std/math/modf.zig+1-1
...@@ -85,7 +85,7 @@ fn ModfTests(comptime T: type) type {...@@ -85,7 +85,7 @@ fn ModfTests(comptime T: type) type {
85 try expectApproxEqAbs(expected_c, r.fpart, epsilon);85 try expectApproxEqAbs(expected_c, r.fpart, epsilon);
86 }86 }
87 test "vector" {87 test "vector" {
88 if (builtin.os.tag == .macos and builtin.cpu.arch == .aarch64) return error.SkipZigTest;88 if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) return error.SkipZigTest;
89 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;89 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
90 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/15952990 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/159529
9191
lib/std/os.zig+5-3
...@@ -74,11 +74,13 @@ pub fn accessW(path: [*:0]const u16) windows.GetFileAttributesError!void {...@@ -74,11 +74,13 @@ pub fn accessW(path: [*:0]const u16) windows.GetFileAttributesError!void {
74pub fn isGetFdPathSupportedOnTarget(os: std.Target.Os) bool {74pub fn isGetFdPathSupportedOnTarget(os: std.Target.Os) bool {
75 return switch (os.tag) {75 return switch (os.tag) {
76 .windows,76 .windows,
77 .macos,77 .driverkit,
78 .ios,78 .ios,
79 .watchos,79 .maccatalyst,
80 .macos,
80 .tvos,81 .tvos,
81 .visionos,82 .visionos,
83 .watchos,
82 .linux,84 .linux,
83 .illumos,85 .illumos,
84 .freebsd,86 .freebsd,
...@@ -113,7 +115,7 @@ pub fn getFdPath(fd: std.posix.fd_t, out_buffer: *[max_path_bytes]u8) std.posix....@@ -113,7 +115,7 @@ pub fn getFdPath(fd: std.posix.fd_t, out_buffer: *[max_path_bytes]u8) std.posix.
113 const end_index = std.unicode.wtf16LeToWtf8(out_buffer, wide_slice);115 const end_index = std.unicode.wtf16LeToWtf8(out_buffer, wide_slice);
114 return out_buffer[0..end_index];116 return out_buffer[0..end_index];
115 },117 },
116 .macos, .ios, .watchos, .tvos, .visionos => {118 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
117 // On macOS, we can use F.GETPATH fcntl command to query the OS for119 // On macOS, we can use F.GETPATH fcntl command to query the OS for
118 // the path to the file descriptor.120 // the path to the file descriptor.
119 @memset(out_buffer[0..max_path_bytes], 0);121 @memset(out_buffer[0..max_path_bytes], 0);
lib/std/posix.zig+8-8
...@@ -861,7 +861,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {...@@ -861,7 +861,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
861 // Prevents EINVAL.861 // Prevents EINVAL.
862 const max_count = switch (native_os) {862 const max_count = switch (native_os) {
863 .linux => 0x7ffff000,863 .linux => 0x7ffff000,
864 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),864 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
865 else => maxInt(isize),865 else => maxInt(isize),
866 };866 };
867 while (true) {867 while (true) {
...@@ -1002,7 +1002,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize {...@@ -1002,7 +1002,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize {
1002 // Prevent EINVAL.1002 // Prevent EINVAL.
1003 const max_count = switch (native_os) {1003 const max_count = switch (native_os) {
1004 .linux => 0x7ffff000,1004 .linux => 0x7ffff000,
1005 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),1005 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
1006 else => maxInt(isize),1006 else => maxInt(isize),
1007 };1007 };
10081008
...@@ -1115,7 +1115,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {...@@ -1115,7 +1115,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
1115/// On these systems, the read races with concurrent writes to the same file descriptor.1115/// On these systems, the read races with concurrent writes to the same file descriptor.
1116pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {1116pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
1117 const have_pread_but_not_preadv = switch (native_os) {1117 const have_pread_but_not_preadv = switch (native_os) {
1118 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,1118 .windows, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku => true,
1119 else => false,1119 else => false,
1120 };1120 };
1121 if (have_pread_but_not_preadv) {1121 if (have_pread_but_not_preadv) {
...@@ -1269,7 +1269,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {...@@ -1269,7 +1269,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
12691269
1270 const max_count = switch (native_os) {1270 const max_count = switch (native_os) {
1271 .linux => 0x7ffff000,1271 .linux => 0x7ffff000,
1272 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),1272 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
1273 else => maxInt(isize),1273 else => maxInt(isize),
1274 };1274 };
1275 while (true) {1275 while (true) {
...@@ -1433,7 +1433,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {...@@ -1433,7 +1433,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
1433 // Prevent EINVAL.1433 // Prevent EINVAL.
1434 const max_count = switch (native_os) {1434 const max_count = switch (native_os) {
1435 .linux => 0x7ffff000,1435 .linux => 0x7ffff000,
1436 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),1436 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
1437 else => maxInt(isize),1437 else => maxInt(isize),
1438 };1438 };
14391439
...@@ -1487,7 +1487,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {...@@ -1487,7 +1487,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
1487/// If `iov.len` is larger than `IOV_MAX`, a partial write will occur.1487/// If `iov.len` is larger than `IOV_MAX`, a partial write will occur.
1488pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize {1488pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize {
1489 const have_pwrite_but_not_pwritev = switch (native_os) {1489 const have_pwrite_but_not_pwritev = switch (native_os) {
1490 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,1490 .windows, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku => true,
1491 else => false,1491 else => false,
1492 };1492 };
14931493
...@@ -1747,7 +1747,7 @@ pub fn execveZ(...@@ -1747,7 +1747,7 @@ pub fn execveZ(
1747 .NOTDIR => return error.NotDir,1747 .NOTDIR => return error.NotDir,
1748 .TXTBSY => return error.FileBusy,1748 .TXTBSY => return error.FileBusy,
1749 else => |err| switch (native_os) {1749 else => |err| switch (native_os) {
1750 .macos, .ios, .tvos, .watchos, .visionos => switch (err) {1750 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (err) {
1751 .BADEXEC => return error.InvalidExe,1751 .BADEXEC => return error.InvalidExe,
1752 .BADARCH => return error.InvalidExe,1752 .BADARCH => return error.InvalidExe,
1753 else => return unexpectedErrno(err),1753 else => return unexpectedErrno(err),
...@@ -6570,7 +6570,7 @@ pub fn ptrace(request: u32, pid: pid_t, addr: usize, data: usize) PtraceError!vo...@@ -6570,7 +6570,7 @@ pub fn ptrace(request: u32, pid: pid_t, addr: usize, data: usize) PtraceError!vo
6570 else => |err| return unexpectedErrno(err),6570 else => |err| return unexpectedErrno(err),
6571 },6571 },
65726572
6573 .macos, .ios, .tvos, .watchos, .visionos => switch (errno(std.c.ptrace(6573 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (errno(std.c.ptrace(
6574 @enumFromInt(request),6574 @enumFromInt(request),
6575 pid,6575 pid,
6576 @ptrFromInt(addr),6576 @ptrFromInt(addr),
lib/std/posix/test.zig+2-2
...@@ -521,7 +521,7 @@ test "getrlimit and setrlimit" {...@@ -521,7 +521,7 @@ test "getrlimit and setrlimit" {
521}521}
522522
523test "sigrtmin/max" {523test "sigrtmin/max" {
524 if (native_os == .wasi or native_os == .windows or native_os == .macos) {524 if (native_os == .wasi or native_os == .windows or native_os.isDarwin()) {
525 return error.SkipZigTest;525 return error.SkipZigTest;
526 }526 }
527527
...@@ -550,7 +550,7 @@ test "sigset empty/full" {...@@ -550,7 +550,7 @@ test "sigset empty/full" {
550// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a550// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a
551// sigset by the C library, so avoid testing them.551// sigset by the C library, so avoid testing them.
552fn reserved_signo(i: usize) bool {552fn reserved_signo(i: usize) bool {
553 if (native_os == .macos) return false;553 if (native_os.isDarwin()) return false;
554 if (!builtin.link_libc) return false;554 if (!builtin.link_libc) return false;
555 const max = if (native_os == .netbsd) 32 else 31;555 const max = if (native_os == .netbsd) 32 else 31;
556 return i > max and i < posix.sigrtmin();556 return i > max and i < posix.sigrtmin();
lib/std/process.zig+8-6
...@@ -1530,11 +1530,13 @@ pub const UserInfo = struct {...@@ -1530,11 +1530,13 @@ pub const UserInfo = struct {
1530pub fn getUserInfo(name: []const u8) !UserInfo {1530pub fn getUserInfo(name: []const u8) !UserInfo {
1531 return switch (native_os) {1531 return switch (native_os) {
1532 .linux,1532 .linux,
1533 .driverkit,
1534 .ios,
1535 .maccatalyst,
1533 .macos,1536 .macos,
1534 .watchos,
1535 .visionos,
1536 .tvos,1537 .tvos,
1537 .ios,1538 .visionos,
1539 .watchos,
1538 .freebsd,1540 .freebsd,
1539 .netbsd,1541 .netbsd,
1540 .openbsd,1542 .openbsd,
...@@ -1666,7 +1668,7 @@ pub fn getBaseAddress() usize {...@@ -1666,7 +1668,7 @@ pub fn getBaseAddress() usize {
1666 else => {},1668 else => {},
1667 } else unreachable;1669 } else unreachable;
1668 },1670 },
1669 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {1671 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
1670 return @intFromPtr(&std.c._mh_execute_header);1672 return @intFromPtr(&std.c._mh_execute_header);
1671 },1673 },
1672 .windows => return @intFromPtr(windows.kernel32.GetModuleHandleW(null)),1674 .windows => return @intFromPtr(windows.kernel32.GetModuleHandleW(null)),
...@@ -1682,7 +1684,7 @@ pub const can_execv = switch (native_os) {...@@ -1682,7 +1684,7 @@ pub const can_execv = switch (native_os) {
16821684
1683/// Tells whether spawning child processes is supported (e.g. via Child)1685/// Tells whether spawning child processes is supported (e.g. via Child)
1684pub const can_spawn = switch (native_os) {1686pub const can_spawn = switch (native_os) {
1685 .wasi, .watchos, .tvos, .visionos => false,1687 .wasi, .ios, .tvos, .visionos, .watchos => false,
1686 else => true,1688 else => true,
1687};1689};
16881690
...@@ -1770,7 +1772,7 @@ pub fn totalSystemMemory() TotalSystemMemoryError!u64 {...@@ -1770,7 +1772,7 @@ pub fn totalSystemMemory() TotalSystemMemoryError!u64 {
1770 return @as(u64, @intCast(physmem));1772 return @as(u64, @intCast(physmem));
1771 },1773 },
1772 // whole Darwin family1774 // whole Darwin family
1773 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {1775 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
1774 // "hw.memsize" returns uint64_t1776 // "hw.memsize" returns uint64_t
1775 var physmem: u64 = undefined;1777 var physmem: u64 = undefined;
1776 var len: usize = @sizeOf(u64);1778 var len: usize = @sizeOf(u64);
lib/std/process/Child.zig+3-3
...@@ -136,7 +136,7 @@ pub const ResourceUsageStatistics = struct {...@@ -136,7 +136,7 @@ pub const ResourceUsageStatistics = struct {
136 return null;136 return null;
137 }137 }
138 },138 },
139 .macos, .ios => {139 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
140 if (rus.rusage) |ru| {140 if (rus.rusage) |ru| {
141 // Darwin oddly reports in bytes instead of kilobytes.141 // Darwin oddly reports in bytes instead of kilobytes.
142 return @as(usize, @intCast(ru.maxrss));142 return @as(usize, @intCast(ru.maxrss));
...@@ -149,7 +149,7 @@ pub const ResourceUsageStatistics = struct {...@@ -149,7 +149,7 @@ pub const ResourceUsageStatistics = struct {
149 }149 }
150150
151 const rusage_init = switch (native_os) {151 const rusage_init = switch (native_os) {
152 .linux, .macos, .ios => @as(?posix.rusage, null),152 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => @as(?posix.rusage, null),
153 .windows => @as(?windows.VM_COUNTERS, null),153 .windows => @as(?windows.VM_COUNTERS, null),
154 else => {},154 else => {},
155 };155 };
...@@ -486,7 +486,7 @@ fn waitUnwrappedPosix(self: *ChildProcess) void {...@@ -486,7 +486,7 @@ fn waitUnwrappedPosix(self: *ChildProcess) void {
486 const res: posix.WaitPidResult = res: {486 const res: posix.WaitPidResult = res: {
487 if (self.request_resource_usage_statistics) {487 if (self.request_resource_usage_statistics) {
488 switch (native_os) {488 switch (native_os) {
489 .linux, .macos, .ios => {489 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
490 var ru: posix.rusage = undefined;490 var ru: posix.rusage = undefined;
491 const res = posix.wait4(self.id, 0, &ru);491 const res = posix.wait4(self.id, 0, &ru);
492 self.resource_usage_statistics.rusage = ru;492 self.resource_usage_statistics.rusage = ru;
lib/std/time.zig+1-1
...@@ -76,7 +76,7 @@ pub const Instant = struct {...@@ -76,7 +76,7 @@ pub const Instant = struct {
76 },76 },
77 // On darwin, use UPTIME_RAW instead of MONOTONIC as it ticks while77 // On darwin, use UPTIME_RAW instead of MONOTONIC as it ticks while
78 // suspended.78 // suspended.
79 .macos, .ios, .tvos, .watchos, .visionos => posix.CLOCK.UPTIME_RAW,79 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.UPTIME_RAW,
80 // On freebsd derivatives, use MONOTONIC_FAST as currently there's80 // On freebsd derivatives, use MONOTONIC_FAST as currently there's
81 // no precision tradeoff.81 // no precision tradeoff.
82 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,82 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,
lib/std/zig/LibCDirs.zig+1-2
...@@ -227,7 +227,7 @@ pub fn detectFromBuilding(...@@ -227,7 +227,7 @@ pub fn detectFromBuilding(
227fn libCGenericName(target: *const std.Target) [:0]const u8 {227fn libCGenericName(target: *const std.Target) [:0]const u8 {
228 switch (target.os.tag) {228 switch (target.os.tag) {
229 .windows => return "mingw",229 .windows => return "mingw",
230 .macos, .ios, .tvos, .watchos, .visionos => return "darwin",230 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => return "darwin",
231 .freebsd => return "freebsd",231 .freebsd => return "freebsd",
232 .netbsd => return "netbsd",232 .netbsd => return "netbsd",
233 else => {},233 else => {},
...@@ -263,7 +263,6 @@ fn libCGenericName(target: *const std.Target) [:0]const u8 {...@@ -263,7 +263,6 @@ fn libCGenericName(target: *const std.Target) [:0]const u8 {
263 .msvc,263 .msvc,
264 .itanium,264 .itanium,
265 .simulator,265 .simulator,
266 .macabi,
267 => unreachable,266 => unreachable,
268 }267 }
269}268}
lib/std/zig/system.zig+1-1
...@@ -81,7 +81,7 @@ pub fn getExternalExecutor(...@@ -81,7 +81,7 @@ pub fn getExternalExecutor(
81 // If the OS match and OS is macOS and CPU is arm64, we can use Rosetta 281 // If the OS match and OS is macOS and CPU is arm64, we can use Rosetta 2
82 // to emulate the foreign architecture.82 // to emulate the foreign architecture.
83 if (options.allow_rosetta and os_match and83 if (options.allow_rosetta and os_match and
84 host.os.tag == .macos and host.cpu.arch == .aarch64)84 (host.os.tag == .maccatalyst or host.os.tag == .macos) and host.cpu.arch == .aarch64)
85 {85 {
86 switch (candidate.cpu.arch) {86 switch (candidate.cpu.arch) {
87 .x86_64 => return .rosetta,87 .x86_64 => return .rosetta,
lib/std/zig/system/darwin.zig+2-6
...@@ -37,13 +37,9 @@ pub fn isSdkInstalled(allocator: Allocator) bool {...@@ -37,13 +37,9 @@ pub fn isSdkInstalled(allocator: Allocator) bool {
37pub fn getSdk(allocator: Allocator, target: *const Target) ?[]const u8 {37pub fn getSdk(allocator: Allocator, target: *const Target) ?[]const u8 {
38 const is_simulator_abi = target.abi == .simulator;38 const is_simulator_abi = target.abi == .simulator;
39 const sdk = switch (target.os.tag) {39 const sdk = switch (target.os.tag) {
40 .ios => switch (target.abi) {
41 .macabi => "macosx",
42 .simulator => "iphonesimulator",
43 else => "iphoneos",
44 },
45 .driverkit => "driverkit",40 .driverkit => "driverkit",
46 .macos => "macosx",41 .ios => if (is_simulator_abi) "iphonesimulator" else "iphoneos",
42 .maccatalyst, .macos => "macosx",
47 .tvos => if (is_simulator_abi) "appletvsimulator" else "appletvos",43 .tvos => if (is_simulator_abi) "appletvsimulator" else "appletvos",
48 .visionos => if (is_simulator_abi) "xrsimulator" else "xros",44 .visionos => if (is_simulator_abi) "xrsimulator" else "xros",
49 .watchos => if (is_simulator_abi) "watchsimulator" else "watchos",45 .watchos => if (is_simulator_abi) "watchsimulator" else "watchos",
src/Compilation.zig+5-2
...@@ -6761,12 +6761,15 @@ fn addCommonCCArgs(...@@ -6761,12 +6761,15 @@ fn addCommonCCArgs(
6761 }6761 }
67626762
6763 switch (target.os.tag) {6763 switch (target.os.tag) {
6764 .ios, .macos, .tvos, .watchos => |os| if (is_clang) {6764 .ios, .maccatalyst, .macos, .tvos, .watchos => |os| if (is_clang) {
6765 try argv.ensureUnusedCapacity(2);6765 try argv.ensureUnusedCapacity(2);
6766 // Pass the proper -m<os>-version-min argument for darwin.6766 // Pass the proper -m<os>-version-min argument for darwin.
6767 const ver = target.os.version_range.semver.min;6767 const ver = target.os.version_range.semver.min;
6768 argv.appendAssumeCapacity(try std.fmt.allocPrint(arena, "-m{s}{s}-version-min={d}.{d}.{d}", .{6768 argv.appendAssumeCapacity(try std.fmt.allocPrint(arena, "-m{s}{s}-version-min={d}.{d}.{d}", .{
6769 @tagName(os),6769 switch (os) {
6770 .maccatalyst => "ios",
6771 else => @tagName(os),
6772 },
6770 switch (target.abi) {6773 switch (target.abi) {
6771 .simulator => "-simulator",6774 .simulator => "-simulator",
6772 else => "",6775 else => "",
src/Compilation/Config.zig+1-1
...@@ -369,7 +369,7 @@ pub fn resolve(options: Options) ResolveError!Config {...@@ -369,7 +369,7 @@ pub fn resolve(options: Options) ResolveError!Config {
369369
370 // load_dynamic_library standalone test not passing on this combination370 // load_dynamic_library standalone test not passing on this combination
371 // https://github.com/ziglang/zig/issues/24080371 // https://github.com/ziglang/zig/issues/24080
372 if (target.os.tag == .macos and is_dyn_lib) break :b true;372 if (target.os.tag.isDarwin() and is_dyn_lib) break :b true;
373373
374 // At this point we would prefer to use our own self-hosted backend,374 // At this point we would prefer to use our own self-hosted backend,
375 // because the compilation speed is better than LLVM. But only do it if375 // because the compilation speed is better than LLVM. But only do it if
src/Zcu/PerThread.zig+1-1
...@@ -189,7 +189,7 @@ pub fn updateFile(...@@ -189,7 +189,7 @@ pub fn updateFile(
189 // disambiguates by returning EEXIST, indicating original189 // disambiguates by returning EEXIST, indicating original
190 // failure was a race, or ENOENT, indicating deletion of the190 // failure was a race, or ENOENT, indicating deletion of the
191 // directory of our open handle.191 // directory of our open handle.
192 if (builtin.os.tag != .macos) {192 if (!builtin.os.tag.isDarwin()) {
193 std.process.fatal("cache directory '{f}' unexpectedly removed during compiler execution", .{193 std.process.fatal("cache directory '{f}' unexpectedly removed during compiler execution", .{
194 cache_directory,194 cache_directory,
195 });195 });
src/codegen/llvm.zig+10-9
...@@ -183,6 +183,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -183,6 +183,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
183 try llvm_triple.appendSlice(switch (target.os.tag) {183 try llvm_triple.appendSlice(switch (target.os.tag) {
184 .driverkit,184 .driverkit,
185 .ios,185 .ios,
186 .maccatalyst,
186 .macos,187 .macos,
187 .tvos,188 .tvos,
188 .visionos,189 .visionos,
...@@ -204,7 +205,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -204,7 +205,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
204 try llvm_triple.append('-');205 try llvm_triple.append('-');
205206
206 const llvm_os = switch (target.os.tag) {207 const llvm_os = switch (target.os.tag) {
207 .freestanding => "unknown",
208 .dragonfly => "dragonfly",208 .dragonfly => "dragonfly",
209 .freebsd => "freebsd",209 .freebsd => "freebsd",
210 .fuchsia => "fuchsia",210 .fuchsia => "fuchsia",
...@@ -218,11 +218,9 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -218,11 +218,9 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
218 .cuda => "cuda",218 .cuda => "cuda",
219 .nvcl => "nvcl",219 .nvcl => "nvcl",
220 .amdhsa => "amdhsa",220 .amdhsa => "amdhsa",
221 .opencl => "unknown", // https://llvm.org/docs/SPIRVUsage.html#target-triples
222 .ps3 => "lv2",221 .ps3 => "lv2",
223 .ps4 => "ps4",222 .ps4 => "ps4",
224 .ps5 => "ps5",223 .ps5 => "ps5",
225 .vita => "unknown", // LLVM doesn't know about this target
226 .mesa3d => "mesa3d",224 .mesa3d => "mesa3d",
227 .amdpal => "amdpal",225 .amdpal => "amdpal",
228 .hermit => "hermit",226 .hermit => "hermit",
...@@ -230,7 +228,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -230,7 +228,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
230 .wasi => "wasi",228 .wasi => "wasi",
231 .emscripten => "emscripten",229 .emscripten => "emscripten",
232 .macos => "macosx",230 .macos => "macosx",
233 .ios => "ios",231 .ios, .maccatalyst => "ios",
234 .tvos => "tvos",232 .tvos => "tvos",
235 .watchos => "watchos",233 .watchos => "watchos",
236 .driverkit => "driverkit",234 .driverkit => "driverkit",
...@@ -240,10 +238,13 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -240,10 +238,13 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
240 .managarm => "managarm",238 .managarm => "managarm",
241239
242 .@"3ds",240 .@"3ds",
243 .opengl,
244 .plan9,
245 .contiki,241 .contiki,
242 .freestanding,
243 .opencl, // https://llvm.org/docs/SPIRVUsage.html#target-triples
244 .opengl,
246 .other,245 .other,
246 .plan9,
247 .vita,
247 => "unknown",248 => "unknown",
248 };249 };
249 try llvm_triple.appendSlice(llvm_os);250 try llvm_triple.appendSlice(llvm_os);
...@@ -266,7 +267,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -266,7 +267,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
266 try llvm_triple.append('-');267 try llvm_triple.append('-');
267268
268 const llvm_abi = switch (target.abi) {269 const llvm_abi = switch (target.abi) {
269 .none, .ilp32 => "unknown",270 .none => if (target.os.tag == .maccatalyst) "macabi" else "unknown",
270 .gnu => "gnu",271 .gnu => "gnu",
271 .gnuabin32 => "gnuabin32",272 .gnuabin32 => "gnuabin32",
272 .gnuabi64 => "gnuabi64",273 .gnuabi64 => "gnuabi64",
...@@ -275,6 +276,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -275,6 +276,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
275 .gnuf32 => "gnuf32",276 .gnuf32 => "gnuf32",
276 .gnusf => "gnusf",277 .gnusf => "gnusf",
277 .gnux32 => "gnux32",278 .gnux32 => "gnux32",
279 .ilp32 => "unknown",
278 .code16 => "code16",280 .code16 => "code16",
279 .eabi => "eabi",281 .eabi => "eabi",
280 .eabihf => "eabihf",282 .eabihf => "eabihf",
...@@ -296,7 +298,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8...@@ -296,7 +298,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
296 .msvc => "msvc",298 .msvc => "msvc",
297 .itanium => "itanium",299 .itanium => "itanium",
298 .simulator => "simulator",300 .simulator => "simulator",
299 .macabi => "macabi",
300 .ohos, .ohoseabi => "ohos",301 .ohos, .ohoseabi => "ohos",
301 };302 };
302 try llvm_triple.appendSlice(llvm_abi);303 try llvm_triple.appendSlice(llvm_abi);
...@@ -12595,7 +12596,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std....@@ -12595,7 +12596,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std.
12595 else => return null,12596 else => return null,
12596 };12597 };
12597 return switch (target.os.tag) {12598 return switch (target.os.tag) {
12598 .macos, .ios, .watchos, .tvos, .visionos => switch (int_info.bits) {12599 .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => switch (int_info.bits) {
12599 0...16 => int_info.signedness,12600 0...16 => int_info.signedness,
12600 else => null,12601 else => null,
12601 },12602 },
src/libs/libtsan.zig+2-2
...@@ -30,7 +30,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo...@@ -30,7 +30,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
30 const root_name = switch (target.os.tag) {30 const root_name = switch (target.os.tag) {
31 // On Apple platforms, we use the same name as LLVM because the31 // On Apple platforms, we use the same name as LLVM because the
32 // TSAN library implementation hard-codes a check for these names.32 // TSAN library implementation hard-codes a check for these names.
33 .driverkit, .macos => "clang_rt.tsan_osx_dynamic",33 .driverkit, .maccatalyst, .macos => "clang_rt.tsan_osx_dynamic",
34 .ios => if (target.abi == .simulator) "clang_rt.tsan_iossim_dynamic" else "clang_rt.tsan_ios_dynamic",34 .ios => if (target.abi == .simulator) "clang_rt.tsan_iossim_dynamic" else "clang_rt.tsan_ios_dynamic",
35 .tvos => if (target.abi == .simulator) "clang_rt.tsan_tvossim_dynamic" else "clang_rt.tsan_tvos_dynamic",35 .tvos => if (target.abi == .simulator) "clang_rt.tsan_tvossim_dynamic" else "clang_rt.tsan_tvos_dynamic",
36 .visionos => if (target.abi == .simulator) "clang_rt.tsan_xrossim_dynamic" else "clang_rt.tsan_xros_dynamic",36 .visionos => if (target.abi == .simulator) "clang_rt.tsan_xrossim_dynamic" else "clang_rt.tsan_xros_dynamic",
...@@ -134,7 +134,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo...@@ -134,7 +134,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
134 }134 }
135135
136 const platform_tsan_sources = switch (target.os.tag) {136 const platform_tsan_sources = switch (target.os.tag) {
137 .ios, .macos, .watchos, .tvos, .visionos => &darwin_tsan_sources,137 .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => &darwin_tsan_sources,
138 .windows => &windows_tsan_sources,138 .windows => &windows_tsan_sources,
139 else => &unix_tsan_sources,139 else => &unix_tsan_sources,
140 };140 };
src/link.zig+2-2
...@@ -620,7 +620,7 @@ pub const File = struct {...@@ -620,7 +620,7 @@ pub const File = struct {
620 .linux => std.posix.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0) catch |err| {620 .linux => std.posix.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0) catch |err| {
621 log.warn("ptrace failure: {s}", .{@errorName(err)});621 log.warn("ptrace failure: {s}", .{@errorName(err)});
622 },622 },
623 .macos => {623 .maccatalyst, .macos => {
624 const macho_file = base.cast(.macho).?;624 const macho_file = base.cast(.macho).?;
625 macho_file.ptraceAttach(pid) catch |err| {625 macho_file.ptraceAttach(pid) catch |err| {
626 log.warn("attaching failed with error: {s}", .{@errorName(err)});626 log.warn("attaching failed with error: {s}", .{@errorName(err)});
...@@ -700,7 +700,7 @@ pub const File = struct {...@@ -700,7 +700,7 @@ pub const File = struct {
700700
701 if (base.child_pid) |pid| {701 if (base.child_pid) |pid| {
702 switch (builtin.os.tag) {702 switch (builtin.os.tag) {
703 .macos => {703 .maccatalyst, .macos => {
704 const macho_file = base.cast(.macho).?;704 const macho_file = base.cast(.macho).?;
705 macho_file.ptraceDetach(pid) catch |err| {705 macho_file.ptraceDetach(pid) catch |err| {
706 log.warn("detaching failed with error: {s}", .{@errorName(err)});706 log.warn("detaching failed with error: {s}", .{@errorName(err)});
src/link/MachO.zig+17-20
...@@ -3596,7 +3596,7 @@ pub fn requiresCodeSig(self: MachO) bool {...@@ -3596,7 +3596,7 @@ pub fn requiresCodeSig(self: MachO) bool {
3596 const target = self.getTarget();3596 const target = self.getTarget();
3597 return switch (target.cpu.arch) {3597 return switch (target.cpu.arch) {
3598 .aarch64 => switch (target.os.tag) {3598 .aarch64 => switch (target.os.tag) {
3599 .driverkit, .macos => true,3599 .driverkit, .maccatalyst, .macos => true,
3600 .ios, .tvos, .visionos, .watchos => target.abi == .simulator,3600 .ios, .tvos, .visionos, .watchos => target.abi == .simulator,
3601 else => false,3601 else => false,
3602 },3602 },
...@@ -4032,7 +4032,7 @@ fn formatSectType(tt: u8, w: *Writer) Writer.Error!void {...@@ -4032,7 +4032,7 @@ fn formatSectType(tt: u8, w: *Writer) Writer.Error!void {
4032}4032}
40334033
4034const is_hot_update_compatible = switch (builtin.target.os.tag) {4034const is_hot_update_compatible = switch (builtin.target.os.tag) {
4035 .macos => true,4035 .maccatalyst, .macos => true,
4036 else => false,4036 else => false,
4037};4037};
40384038
...@@ -4174,7 +4174,7 @@ pub const Platform = struct {...@@ -4174,7 +4174,7 @@ pub const Platform = struct {
4174 .os_tag = switch (cmd.platform) {4174 .os_tag = switch (cmd.platform) {
4175 .DRIVERKIT => .driverkit,4175 .DRIVERKIT => .driverkit,
4176 .IOS, .IOSSIMULATOR => .ios,4176 .IOS, .IOSSIMULATOR => .ios,
4177 .MACCATALYST => .ios,4177 .MACCATALYST => .maccatalyst,
4178 .MACOS => .macos,4178 .MACOS => .macos,
4179 .TVOS, .TVOSSIMULATOR => .tvos,4179 .TVOS, .TVOSSIMULATOR => .tvos,
4180 .VISIONOS, .VISIONOSSIMULATOR => .visionos,4180 .VISIONOS, .VISIONOSSIMULATOR => .visionos,
...@@ -4182,7 +4182,6 @@ pub const Platform = struct {...@@ -4182,7 +4182,6 @@ pub const Platform = struct {
4182 else => @panic("TODO"),4182 else => @panic("TODO"),
4183 },4183 },
4184 .abi = switch (cmd.platform) {4184 .abi = switch (cmd.platform) {
4185 .MACCATALYST => .macabi,
4186 .IOSSIMULATOR,4185 .IOSSIMULATOR,
4187 .TVOSSIMULATOR,4186 .TVOSSIMULATOR,
4188 .VISIONOSSIMULATOR,4187 .VISIONOSSIMULATOR,
...@@ -4198,6 +4197,7 @@ pub const Platform = struct {...@@ -4198,6 +4197,7 @@ pub const Platform = struct {
4198 .VERSION_MIN_TVOS,4197 .VERSION_MIN_TVOS,
4199 .VERSION_MIN_WATCHOS,4198 .VERSION_MIN_WATCHOS,
4200 => {4199 => {
4200 // We can't distinguish Mac Catalyst here, but this is legacy stuff anyway.
4201 const cmd = lc.cast(macho.version_min_command).?;4201 const cmd = lc.cast(macho.version_min_command).?;
4202 return .{4202 return .{
4203 .os_tag = switch (lc.cmd()) {4203 .os_tag = switch (lc.cmd()) {
...@@ -4230,11 +4230,8 @@ pub const Platform = struct {...@@ -4230,11 +4230,8 @@ pub const Platform = struct {
4230 pub fn toApplePlatform(plat: Platform) macho.PLATFORM {4230 pub fn toApplePlatform(plat: Platform) macho.PLATFORM {
4231 return switch (plat.os_tag) {4231 return switch (plat.os_tag) {
4232 .driverkit => .DRIVERKIT,4232 .driverkit => .DRIVERKIT,
4233 .ios => switch (plat.abi) {4233 .ios => if (plat.abi == .simulator) .IOSSIMULATOR else .IOS,
4234 .macabi => .MACCATALYST,4234 .maccatalyst => .MACCATALYST,
4235 .simulator => .IOSSIMULATOR,
4236 else => .IOS,
4237 },
4238 .macos => .MACOS,4235 .macos => .MACOS,
4239 .tvos => if (plat.abi == .simulator) .TVOSSIMULATOR else .TVOS,4236 .tvos => if (plat.abi == .simulator) .TVOSSIMULATOR else .TVOS,
4240 .visionos => if (plat.abi == .simulator) .VISIONOSSIMULATOR else .VISIONOS,4237 .visionos => if (plat.abi == .simulator) .VISIONOSSIMULATOR else .VISIONOS,
...@@ -4300,17 +4297,17 @@ const SupportedPlatforms = struct {...@@ -4300,17 +4297,17 @@ const SupportedPlatforms = struct {
4300// Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L524297// Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L52
4301// zig fmt: off4298// zig fmt: off
4302const supported_platforms = [_]SupportedPlatforms{4299const supported_platforms = [_]SupportedPlatforms{
4303 .{ .driverkit, .none, 0x130000, 0x130000 },4300 .{ .driverkit, .none, 0x130000, 0x130000 },
4304 .{ .ios, .none, 0x0C0000, 0x070000 },4301 .{ .ios, .none, 0x0C0000, 0x070000 },
4305 .{ .ios, .macabi, 0x0D0000, 0x0D0000 },4302 .{ .ios, .simulator, 0x0D0000, 0x080000 },
4306 .{ .ios, .simulator, 0x0D0000, 0x080000 },4303 .{ .maccatalyst, .none, 0x0D0000, 0x0D0000 },
4307 .{ .macos, .none, 0x0A0E00, 0x0A0800 },4304 .{ .macos, .none, 0x0A0E00, 0x0A0800 },
4308 .{ .tvos, .none, 0x0C0000, 0x070000 },4305 .{ .tvos, .none, 0x0C0000, 0x070000 },
4309 .{ .tvos, .simulator, 0x0D0000, 0x080000 },4306 .{ .tvos, .simulator, 0x0D0000, 0x080000 },
4310 .{ .visionos, .none, 0x010000, 0x010000 },4307 .{ .visionos, .none, 0x010000, 0x010000 },
4311 .{ .visionos, .simulator, 0x010000, 0x010000 },4308 .{ .visionos, .simulator, 0x010000, 0x010000 },
4312 .{ .watchos, .none, 0x050000, 0x020000 },4309 .{ .watchos, .none, 0x050000, 0x020000 },
4313 .{ .watchos, .simulator, 0x060000, 0x020000 },4310 .{ .watchos, .simulator, 0x060000, 0x020000 },
4314};4311};
4315// zig fmt: on4312// zig fmt: on
43164313
src/link/MachO/load_commands.zig+1-1
...@@ -281,7 +281,7 @@ pub fn writeRpathLC(rpath: []const u8, writer: *Writer) !void {...@@ -281,7 +281,7 @@ pub fn writeRpathLC(rpath: []const u8, writer: *Writer) !void {
281pub fn writeVersionMinLC(platform: MachO.Platform, sdk_version: ?std.SemanticVersion, writer: *Writer) !void {281pub fn writeVersionMinLC(platform: MachO.Platform, sdk_version: ?std.SemanticVersion, writer: *Writer) !void {
282 const cmd: macho.LC = switch (platform.os_tag) {282 const cmd: macho.LC = switch (platform.os_tag) {
283 .macos => .VERSION_MIN_MACOSX,283 .macos => .VERSION_MIN_MACOSX,
284 .ios => .VERSION_MIN_IPHONEOS,284 .ios, .maccatalyst => .VERSION_MIN_IPHONEOS,
285 .tvos => .VERSION_MIN_TVOS,285 .tvos => .VERSION_MIN_TVOS,
286 .watchos => .VERSION_MIN_WATCHOS,286 .watchos => .VERSION_MIN_WATCHOS,
287 else => unreachable,287 else => unreachable,
src/main.zig+1-1
...@@ -4487,7 +4487,7 @@ fn runOrTestHotSwap(...@@ -4487,7 +4487,7 @@ fn runOrTestHotSwap(
4487 }4487 }
44884488
4489 switch (builtin.target.os.tag) {4489 switch (builtin.target.os.tag) {
4490 .macos, .ios, .tvos, .watchos, .visionos => {4490 .macos => {
4491 const PosixSpawn = @import("DarwinPosixSpawn.zig");4491 const PosixSpawn = @import("DarwinPosixSpawn.zig");
44924492
4493 var attr = try PosixSpawn.Attr.init();4493 var attr = try PosixSpawn.Attr.init();
src/target.zig+1
...@@ -29,6 +29,7 @@ pub fn libCNeedsLibUnwind(target: *const std.Target, link_mode: std.builtin.Link...@@ -29,6 +29,7 @@ pub fn libCNeedsLibUnwind(target: *const std.Target, link_mode: std.builtin.Link
2929
30pub fn libCxxNeedsLibUnwind(target: *const std.Target) bool {30pub fn libCxxNeedsLibUnwind(target: *const std.Target) bool {
31 return switch (target.os.tag) {31 return switch (target.os.tag) {
32 .maccatalyst,
32 .macos,33 .macos,
33 .ios,34 .ios,
34 .watchos,35 .watchos,
test/behavior/basic.zig+1-1
...@@ -1398,7 +1398,7 @@ test "allocation and looping over 3-byte integer" {...@@ -1398,7 +1398,7 @@ test "allocation and looping over 3-byte integer" {
1398 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;1398 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
1399 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;1399 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
14001400
1401 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .macos) {1401 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag.isDarwin()) {
1402 return error.SkipZigTest; // TODO1402 return error.SkipZigTest; // TODO
1403 }1403 }
1404 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO1404 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
test/behavior/threadlocal.zig+1-1
...@@ -9,7 +9,7 @@ test "thread local variable" {...@@ -9,7 +9,7 @@ test "thread local variable" {
9 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;9 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
10 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO10 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO
1111
12 if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .macos) {12 if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag.isDarwin()) {
13 // Fails due to register hazards.13 // Fails due to register hazards.
14 return error.SkipZigTest;14 return error.SkipZigTest;
15 }15 }
test/behavior/var_args.zig+5-5
...@@ -97,7 +97,7 @@ test "simple variadic function" {...@@ -97,7 +97,7 @@ test "simple variadic function" {
97 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO97 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
98 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;98 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
99 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;99 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
100 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {100 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
101 // https://github.com/ziglang/zig/issues/14096101 // https://github.com/ziglang/zig/issues/14096
102 return error.SkipZigTest;102 return error.SkipZigTest;
103 }103 }
...@@ -159,7 +159,7 @@ test "coerce reference to var arg" {...@@ -159,7 +159,7 @@ test "coerce reference to var arg" {
159 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO159 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
160 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;160 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
161 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;161 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
162 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {162 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
163 // https://github.com/ziglang/zig/issues/14096163 // https://github.com/ziglang/zig/issues/14096
164 return error.SkipZigTest;164 return error.SkipZigTest;
165 }165 }
...@@ -191,7 +191,7 @@ test "variadic functions" {...@@ -191,7 +191,7 @@ test "variadic functions" {
191 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO191 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
192 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;192 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
193 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;193 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
194 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {194 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
195 // https://github.com/ziglang/zig/issues/14096195 // https://github.com/ziglang/zig/issues/14096
196 return error.SkipZigTest;196 return error.SkipZigTest;
197 }197 }
...@@ -244,7 +244,7 @@ test "copy VaList" {...@@ -244,7 +244,7 @@ test "copy VaList" {
244 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO244 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
245 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;245 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
246 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;246 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
247 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {247 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
248 // https://github.com/ziglang/zig/issues/14096248 // https://github.com/ziglang/zig/issues/14096
249 return error.SkipZigTest;249 return error.SkipZigTest;
250 }250 }
...@@ -279,7 +279,7 @@ test "unused VaList arg" {...@@ -279,7 +279,7 @@ test "unused VaList arg" {
279 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO279 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
280 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;280 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
281 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;281 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
282 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {282 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
283 // https://github.com/ziglang/zig/issues/14096283 // https://github.com/ziglang/zig/issues/14096
284 return error.SkipZigTest;284 return error.SkipZigTest;
285 }285 }
test/c_abi/main.zig+1-1
...@@ -1157,7 +1157,7 @@ test "big simd vector" {...@@ -1157,7 +1157,7 @@ test "big simd vector" {
1157 if (builtin.cpu.arch.isMIPS64() and builtin.mode != .Debug) return error.SkipZigTest;1157 if (builtin.cpu.arch.isMIPS64() and builtin.mode != .Debug) return error.SkipZigTest;
1158 if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;1158 if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
1159 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;1159 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
1160 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .x86_64 and builtin.os.tag == .macos and builtin.mode != .Debug) return error.SkipZigTest;1160 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .x86_64 and builtin.os.tag.isDarwin() and builtin.mode != .Debug) return error.SkipZigTest;
11611161
1162 c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });1162 c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });
11631163
test/llvm_targets.zig+2-1
...@@ -9,7 +9,6 @@ const targets = [_]std.Target.Query{...@@ -9,7 +9,6 @@ const targets = [_]std.Target.Query{
9 .{ .cpu_arch = .aarch64, .os_tag = .haiku, .abi = .none },9 .{ .cpu_arch = .aarch64, .os_tag = .haiku, .abi = .none },
10 .{ .cpu_arch = .aarch64, .os_tag = .hermit, .abi = .none },10 .{ .cpu_arch = .aarch64, .os_tag = .hermit, .abi = .none },
11 .{ .cpu_arch = .aarch64, .os_tag = .hurd, .abi = .gnu },11 .{ .cpu_arch = .aarch64, .os_tag = .hurd, .abi = .gnu },
12 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .macabi },
13 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .none },12 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .none },
14 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .simulator },13 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .simulator },
15 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .android },14 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .android },
...@@ -17,6 +16,7 @@ const targets = [_]std.Target.Query{...@@ -17,6 +16,7 @@ const targets = [_]std.Target.Query{
17 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .musl },16 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .musl },
18 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .none },17 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .none },
19 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .ohos },18 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .ohos },
19 .{ .cpu_arch = .aarch64, .os_tag = .maccatalyst, .abi = .none },
20 .{ .cpu_arch = .aarch64, .os_tag = .macos, .abi = .none },20 .{ .cpu_arch = .aarch64, .os_tag = .macos, .abi = .none },
21 .{ .cpu_arch = .aarch64, .os_tag = .netbsd, .abi = .none },21 .{ .cpu_arch = .aarch64, .os_tag = .netbsd, .abi = .none },
22 .{ .cpu_arch = .aarch64, .os_tag = .openbsd, .abi = .none },22 .{ .cpu_arch = .aarch64, .os_tag = .openbsd, .abi = .none },
...@@ -326,6 +326,7 @@ const targets = [_]std.Target.Query{...@@ -326,6 +326,7 @@ const targets = [_]std.Target.Query{
326 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .muslx32 },326 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .muslx32 },
327 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .none },327 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .none },
328 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .ohos },328 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .ohos },
329 .{ .cpu_arch = .x86_64, .os_tag = .maccatalyst, .abi = .none },
329 .{ .cpu_arch = .x86_64, .os_tag = .macos, .abi = .none },330 .{ .cpu_arch = .x86_64, .os_tag = .macos, .abi = .none },
330 .{ .cpu_arch = .x86_64, .os_tag = .netbsd, .abi = .none },331 .{ .cpu_arch = .x86_64, .os_tag = .netbsd, .abi = .none },
331 .{ .cpu_arch = .x86_64, .os_tag = .openbsd, .abi = .none },332 .{ .cpu_arch = .x86_64, .os_tag = .openbsd, .abi = .none },