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 {
658658 .shadermodel => "shadermodel",
659659 .visionos => "xros",
660660 .serenity => "serenity",
661 .bridgeos => "bridgeos",
661662 .opencl,
662663 .opengl,
663664 .vulkan,
lib/std/Target.zig+10-1
......@@ -38,6 +38,7 @@ pub const Os = struct {
3838 netbsd,
3939 openbsd,
4040
41 bridgeos,
4142 driverkit,
4243 ios,
4344 macos,
......@@ -75,6 +76,7 @@ pub const Os = struct {
7576
7677 pub inline fn isDarwin(tag: Tag) bool {
7778 return switch (tag) {
79 .bridgeos,
7880 .driverkit,
7981 .ios,
8082 .macos,
......@@ -122,6 +124,7 @@ pub const Os = struct {
122124 pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 {
123125 return switch (tag) {
124126 .windows, .uefi => ".dll",
127 .bridgeos,
125128 .driverkit,
126129 .ios,
127130 .macos,
......@@ -186,6 +189,7 @@ pub const Os = struct {
186189 .other,
187190 => .none,
188191
192 .bridgeos,
189193 .driverkit,
190194 .freebsd,
191195 .macos,
......@@ -412,6 +416,7 @@ pub const Os = struct {
412416 .plan9,
413417 .illumos,
414418 .serenity,
419 .bridgeos,
415420 .other,
416421 => .{ .none = {} },
417422
......@@ -573,6 +578,7 @@ pub const Os = struct {
573578 .freebsd,
574579 .aix,
575580 .netbsd,
581 .bridgeos,
576582 .driverkit,
577583 .macos,
578584 .ios,
......@@ -721,6 +727,7 @@ pub const Abi = enum {
721727 .wasi,
722728 .emscripten,
723729 => .musl,
730 .bridgeos,
724731 .opencl,
725732 .opengl,
726733 .vulkan,
......@@ -821,7 +828,7 @@ pub const ObjectFormat = enum {
821828 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {
822829 return switch (os_tag) {
823830 .aix => .xcoff,
824 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
831 .bridgeos, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
825832 .plan9 => .plan9,
826833 .uefi, .windows => .coff,
827834 .zos => .goff,
......@@ -1816,6 +1823,7 @@ pub const DynamicLinker = struct {
18161823 => none,
18171824 },
18181825
1826 .bridgeos,
18191827 .driverkit,
18201828 .ios,
18211829 .tvos,
......@@ -2275,6 +2283,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {
22752283 },
22762284 },
22772285
2286 .bridgeos,
22782287 .driverkit,
22792288 .ios,
22802289 .macos,
src/codegen/llvm.zig+2
......@@ -129,6 +129,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
129129 .hurd => "hurd",
130130 .wasi => "wasi",
131131 .emscripten => "emscripten",
132 .bridgeos => "bridgeos",
132133 .macos => "macosx",
133134 .ios => "ios",
134135 .tvos => "tvos",
......@@ -241,6 +242,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {
241242 .shadermodel => .ShaderModel,
242243 .vulkan => .Vulkan,
243244 .serenity => .Serenity,
245 .bridgeos => .BridgeOS,
244246
245247 .opengl,
246248 .plan9,