authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-26 00:16:31+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-09-19 18:20:21-07:00
loga4d0a01243edf8832c3560f6c46637d52d47e5e8
tree7338a25e46b94d20de4839b0c4b98a9873e49b37
parentbdae7d97b914340caf0bc13b08f6a38f0a1f501a

std.Target: Add bridgeos tag to Os.


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

lib/compiler/aro/aro/target.zig+1
...@@ -658,6 +658,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -658,6 +658,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
658 .shadermodel => "shadermodel",658 .shadermodel => "shadermodel",
659 .visionos => "xros",659 .visionos => "xros",
660 .serenity => "serenity",660 .serenity => "serenity",
661 .bridgeos => "bridgeos",
661 .opencl,662 .opencl,
662 .opengl,663 .opengl,
663 .vulkan,664 .vulkan,
lib/std/Target.zig+10-1
...@@ -38,6 +38,7 @@ pub const Os = struct {...@@ -38,6 +38,7 @@ pub const Os = struct {
38 netbsd,38 netbsd,
39 openbsd,39 openbsd,
4040
41 bridgeos,
41 driverkit,42 driverkit,
42 ios,43 ios,
43 macos,44 macos,
...@@ -75,6 +76,7 @@ pub const Os = struct {...@@ -75,6 +76,7 @@ pub const Os = struct {
7576
76 pub inline fn isDarwin(tag: Tag) bool {77 pub inline fn isDarwin(tag: Tag) bool {
77 return switch (tag) {78 return switch (tag) {
79 .bridgeos,
78 .driverkit,80 .driverkit,
79 .ios,81 .ios,
80 .macos,82 .macos,
...@@ -122,6 +124,7 @@ pub const Os = struct {...@@ -122,6 +124,7 @@ pub const Os = struct {
122 pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 {124 pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 {
123 return switch (tag) {125 return switch (tag) {
124 .windows, .uefi => ".dll",126 .windows, .uefi => ".dll",
127 .bridgeos,
125 .driverkit,128 .driverkit,
126 .ios,129 .ios,
127 .macos,130 .macos,
...@@ -186,6 +189,7 @@ pub const Os = struct {...@@ -186,6 +189,7 @@ pub const Os = struct {
186 .other,189 .other,
187 => .none,190 => .none,
188191
192 .bridgeos,
189 .driverkit,193 .driverkit,
190 .freebsd,194 .freebsd,
191 .macos,195 .macos,
...@@ -412,6 +416,7 @@ pub const Os = struct {...@@ -412,6 +416,7 @@ pub const Os = struct {
412 .plan9,416 .plan9,
413 .illumos,417 .illumos,
414 .serenity,418 .serenity,
419 .bridgeos,
415 .other,420 .other,
416 => .{ .none = {} },421 => .{ .none = {} },
417422
...@@ -573,6 +578,7 @@ pub const Os = struct {...@@ -573,6 +578,7 @@ pub const Os = struct {
573 .freebsd,578 .freebsd,
574 .aix,579 .aix,
575 .netbsd,580 .netbsd,
581 .bridgeos,
576 .driverkit,582 .driverkit,
577 .macos,583 .macos,
578 .ios,584 .ios,
...@@ -721,6 +727,7 @@ pub const Abi = enum {...@@ -721,6 +727,7 @@ pub const Abi = enum {
721 .wasi,727 .wasi,
722 .emscripten,728 .emscripten,
723 => .musl,729 => .musl,
730 .bridgeos,
724 .opencl,731 .opencl,
725 .opengl,732 .opengl,
726 .vulkan,733 .vulkan,
...@@ -821,7 +828,7 @@ pub const ObjectFormat = enum {...@@ -821,7 +828,7 @@ pub const ObjectFormat = enum {
821 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {828 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {
822 return switch (os_tag) {829 return switch (os_tag) {
823 .aix => .xcoff,830 .aix => .xcoff,
824 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,831 .bridgeos, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
825 .plan9 => .plan9,832 .plan9 => .plan9,
826 .uefi, .windows => .coff,833 .uefi, .windows => .coff,
827 .zos => .goff,834 .zos => .goff,
...@@ -1816,6 +1823,7 @@ pub const DynamicLinker = struct {...@@ -1816,6 +1823,7 @@ pub const DynamicLinker = struct {
1816 => none,1823 => none,
1817 },1824 },
18181825
1826 .bridgeos,
1819 .driverkit,1827 .driverkit,
1820 .ios,1828 .ios,
1821 .tvos,1829 .tvos,
...@@ -2275,6 +2283,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {...@@ -2275,6 +2283,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {
2275 },2283 },
2276 },2284 },
22772285
2286 .bridgeos,
2278 .driverkit,2287 .driverkit,
2279 .ios,2288 .ios,
2280 .macos,2289 .macos,
src/codegen/llvm.zig+2
...@@ -129,6 +129,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {...@@ -129,6 +129,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
129 .hurd => "hurd",129 .hurd => "hurd",
130 .wasi => "wasi",130 .wasi => "wasi",
131 .emscripten => "emscripten",131 .emscripten => "emscripten",
132 .bridgeos => "bridgeos",
132 .macos => "macosx",133 .macos => "macosx",
133 .ios => "ios",134 .ios => "ios",
134 .tvos => "tvos",135 .tvos => "tvos",
...@@ -241,6 +242,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {...@@ -241,6 +242,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {
241 .shadermodel => .ShaderModel,242 .shadermodel => .ShaderModel,
242 .vulkan => .Vulkan,243 .vulkan => .Vulkan,
243 .serenity => .Serenity,244 .serenity => .Serenity,
245 .bridgeos => .BridgeOS,
244246
245 .opengl,247 .opengl,
246 .plan9,248 .plan9,