std.Target: Add bridgeos tag to Os.

This commit is contained in:
Alex Rønne Petersen 2024-08-26 00:16:31 +02:00 committed by Andrew Kelley
parent bdae7d97b9
commit a4d0a01243
3 changed files with 13 additions and 1 deletions

View File

@ -658,6 +658,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
.shadermodel => "shadermodel",
.visionos => "xros",
.serenity => "serenity",
.bridgeos => "bridgeos",
.opencl,
.opengl,
.vulkan,

View File

@ -38,6 +38,7 @@ pub const Os = struct {
netbsd,
openbsd,
bridgeos,
driverkit,
ios,
macos,
@ -75,6 +76,7 @@ pub const Os = struct {
pub inline fn isDarwin(tag: Tag) bool {
return switch (tag) {
.bridgeos,
.driverkit,
.ios,
.macos,
@ -122,6 +124,7 @@ pub const Os = struct {
pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 {
return switch (tag) {
.windows, .uefi => ".dll",
.bridgeos,
.driverkit,
.ios,
.macos,
@ -186,6 +189,7 @@ pub const Os = struct {
.other,
=> .none,
.bridgeos,
.driverkit,
.freebsd,
.macos,
@ -412,6 +416,7 @@ pub const Os = struct {
.plan9,
.illumos,
.serenity,
.bridgeos,
.other,
=> .{ .none = {} },
@ -573,6 +578,7 @@ pub const Os = struct {
.freebsd,
.aix,
.netbsd,
.bridgeos,
.driverkit,
.macos,
.ios,
@ -721,6 +727,7 @@ pub const Abi = enum {
.wasi,
.emscripten,
=> .musl,
.bridgeos,
.opencl,
.opengl,
.vulkan,
@ -821,7 +828,7 @@ pub const ObjectFormat = enum {
pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {
return switch (os_tag) {
.aix => .xcoff,
.driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
.bridgeos, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
.plan9 => .plan9,
.uefi, .windows => .coff,
.zos => .goff,
@ -1816,6 +1823,7 @@ pub const DynamicLinker = struct {
=> none,
},
.bridgeos,
.driverkit,
.ios,
.tvos,
@ -2275,6 +2283,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {
},
},
.bridgeos,
.driverkit,
.ios,
.macos,

View File

@ -129,6 +129,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
.hurd => "hurd",
.wasi => "wasi",
.emscripten => "emscripten",
.bridgeos => "bridgeos",
.macos => "macosx",
.ios => "ios",
.tvos => "tvos",
@ -241,6 +242,7 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {
.shadermodel => .ShaderModel,
.vulkan => .Vulkan,
.serenity => .Serenity,
.bridgeos => .BridgeOS,
.opengl,
.plan9,