| author | |
| committer | |
| log | 09b39f77b7e380857c79adaec4765350163d6e16 |
| tree | fcf5d90a0f79f3757f51fd9917ce8bf5044647e8 |
| parent | 4e09e363cd00b1dd36467ef7958d750ea09f296d |
| signature |
It doesn't appear that targeting bridgeOS is meaningfully supported by Apple.
Even LLVM/Clang appear to have incomplete support for it, suggesting that Apple
never bothered to upstream that support. So there's really no sense in us
pretending to support this.5 files changed, 6 insertions(+), 34 deletions(-)
lib/compiler/aro/aro/target.zig-1| ... | @@ -663,7 +663,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { | ... | @@ -663,7 +663,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { |
| 663 | .driverkit => "driverkit", | 663 | .driverkit => "driverkit", |
| 664 | .visionos => "xros", | 664 | .visionos => "xros", |
| 665 | .serenity => "serenity", | 665 | .serenity => "serenity", |
| 666 | .bridgeos => "bridgeos", | ||
| 667 | .opencl, | 666 | .opencl, |
| 668 | .opengl, | 667 | .opengl, |
| 669 | .vulkan, | 668 | .vulkan, |
lib/std/Target.zig+4-20| ... | @@ -38,7 +38,6 @@ pub const Os = struct { | ... | @@ -38,7 +38,6 @@ pub const Os = struct { |
| 38 | netbsd, | 38 | netbsd, |
| 39 | openbsd, | 39 | openbsd, |
| 40 | 40 | ||
| 41 | bridgeos, | ||
| 42 | driverkit, | 41 | driverkit, |
| 43 | ios, | 42 | ios, |
| 44 | macos, | 43 | macos, |
| ... | @@ -69,6 +68,7 @@ pub const Os = struct { | ... | @@ -69,6 +68,7 @@ pub const Os = struct { |
| 69 | vulkan, | 68 | vulkan, |
| 70 | 69 | ||
| 71 | // LLVM tags deliberately omitted: | 70 | // LLVM tags deliberately omitted: |
| 71 | // - bridgeos | ||
| 72 | // - darwin | 72 | // - darwin |
| 73 | // - kfreebsd | 73 | // - kfreebsd |
| 74 | // - nacl | 74 | // - nacl |
| ... | @@ -76,7 +76,6 @@ pub const Os = struct { | ... | @@ -76,7 +76,6 @@ pub const Os = struct { |
| 76 | 76 | ||
| 77 | pub inline fn isDarwin(tag: Tag) bool { | 77 | pub inline fn isDarwin(tag: Tag) bool { |
| 78 | return switch (tag) { | 78 | return switch (tag) { |
| 79 | .bridgeos, | ||
| 80 | .driverkit, | 79 | .driverkit, |
| 81 | .ios, | 80 | .ios, |
| 82 | .macos, | 81 | .macos, |
| ... | @@ -124,7 +123,6 @@ pub const Os = struct { | ... | @@ -124,7 +123,6 @@ pub const Os = struct { |
| 124 | pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 { | 123 | pub fn dynamicLibSuffix(tag: Tag) [:0]const u8 { |
| 125 | return switch (tag) { | 124 | return switch (tag) { |
| 126 | .windows, .uefi => ".dll", | 125 | .windows, .uefi => ".dll", |
| 127 | .bridgeos, | ||
| 128 | .driverkit, | 126 | .driverkit, |
| 129 | .ios, | 127 | .ios, |
| 130 | .macos, | 128 | .macos, |
| ... | @@ -168,9 +166,6 @@ pub const Os = struct { | ... | @@ -168,9 +166,6 @@ pub const Os = struct { |
| 168 | .plan9, | 166 | .plan9, |
| 169 | .serenity, | 167 | .serenity, |
| 170 | 168 | ||
| 171 | // This should use semver once we determine the version history. | ||
| 172 | .bridgeos, | ||
| 173 | |||
| 174 | .illumos, | 169 | .illumos, |
| 175 | 170 | ||
| 176 | .ps3, | 171 | .ps3, |
| ... | @@ -432,9 +427,6 @@ pub const Os = struct { | ... | @@ -432,9 +427,6 @@ pub const Os = struct { |
| 432 | .plan9, | 427 | .plan9, |
| 433 | .serenity, | 428 | .serenity, |
| 434 | 429 | ||
| 435 | // This should use semver once we determine the version history. | ||
| 436 | .bridgeos, | ||
| 437 | |||
| 438 | .illumos, | 430 | .illumos, |
| 439 | 431 | ||
| 440 | .ps3, | 432 | .ps3, |
| ... | @@ -701,7 +693,6 @@ pub const Os = struct { | ... | @@ -701,7 +693,6 @@ pub const Os = struct { |
| 701 | .freebsd, | 693 | .freebsd, |
| 702 | .aix, | 694 | .aix, |
| 703 | .netbsd, | 695 | .netbsd, |
| 704 | .bridgeos, | ||
| 705 | .driverkit, | 696 | .driverkit, |
| 706 | .macos, | 697 | .macos, |
| 707 | .ios, | 698 | .ios, |
| ... | @@ -927,7 +918,6 @@ pub const Abi = enum { | ... | @@ -927,7 +918,6 @@ pub const Abi = enum { |
| 927 | .serenity, | 918 | .serenity, |
| 928 | .zos, | 919 | .zos, |
| 929 | .dragonfly, | 920 | .dragonfly, |
| 930 | .bridgeos, | ||
| 931 | .driverkit, | 921 | .driverkit, |
| 932 | .macos, | 922 | .macos, |
| 933 | .illumos, | 923 | .illumos, |
| ... | @@ -1049,7 +1039,7 @@ pub const ObjectFormat = enum { | ... | @@ -1049,7 +1039,7 @@ pub const ObjectFormat = enum { |
| 1049 | pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat { | 1039 | pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat { |
| 1050 | return switch (os_tag) { | 1040 | return switch (os_tag) { |
| 1051 | .aix => .xcoff, | 1041 | .aix => .xcoff, |
| 1052 | .bridgeos, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho, | 1042 | .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho, |
| 1053 | .plan9 => .plan9, | 1043 | .plan9 => .plan9, |
| 1054 | .uefi, .windows => .coff, | 1044 | .uefi, .windows => .coff, |
| 1055 | .zos => .goff, | 1045 | .zos => .goff, |
| ... | @@ -1975,7 +1965,7 @@ pub const Cpu = struct { | ... | @@ -1975,7 +1965,7 @@ pub const Cpu = struct { |
| 1975 | .amdgcn => &amdgcn.cpu.gfx906, | 1965 | .amdgcn => &amdgcn.cpu.gfx906, |
| 1976 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, | 1966 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, |
| 1977 | .aarch64 => switch (os.tag) { | 1967 | .aarch64 => switch (os.tag) { |
| 1978 | .bridgeos, .driverkit, .macos => &aarch64.cpu.apple_m1, | 1968 | .driverkit, .macos => &aarch64.cpu.apple_m1, |
| 1979 | .ios, .tvos => &aarch64.cpu.apple_a7, | 1969 | .ios, .tvos => &aarch64.cpu.apple_a7, |
| 1980 | .visionos => &aarch64.cpu.apple_m2, | 1970 | .visionos => &aarch64.cpu.apple_m2, |
| 1981 | .watchos => &aarch64.cpu.apple_s4, | 1971 | .watchos => &aarch64.cpu.apple_s4, |
| ... | @@ -2159,7 +2149,6 @@ pub const DynamicLinker = struct { | ... | @@ -2159,7 +2149,6 @@ pub const DynamicLinker = struct { |
| 2159 | .netbsd, | 2149 | .netbsd, |
| 2160 | .openbsd, | 2150 | .openbsd, |
| 2161 | 2151 | ||
| 2162 | .bridgeos, | ||
| 2163 | .driverkit, | 2152 | .driverkit, |
| 2164 | .ios, | 2153 | .ios, |
| 2165 | .macos, | 2154 | .macos, |
| ... | @@ -2546,7 +2535,6 @@ pub const DynamicLinker = struct { | ... | @@ -2546,7 +2535,6 @@ pub const DynamicLinker = struct { |
| 2546 | else => none, | 2535 | else => none, |
| 2547 | }, | 2536 | }, |
| 2548 | 2537 | ||
| 2549 | .bridgeos => if (cpu.arch == .aarch64) init("/usr/lib/dyld") else none, | ||
| 2550 | .driverkit, | 2538 | .driverkit, |
| 2551 | .ios, | 2539 | .ios, |
| 2552 | .macos, | 2540 | .macos, |
| ... | @@ -3045,7 +3033,6 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { | ... | @@ -3045,7 +3033,6 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { |
| 3045 | }, | 3033 | }, |
| 3046 | }, | 3034 | }, |
| 3047 | 3035 | ||
| 3048 | .bridgeos, | ||
| 3049 | .driverkit, | 3036 | .driverkit, |
| 3050 | .ios, | 3037 | .ios, |
| 3051 | .macos, | 3038 | .macos, |
| ... | @@ -3069,10 +3056,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { | ... | @@ -3069,10 +3056,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 { |
| 3069 | }, | 3056 | }, |
| 3070 | .longlong, .ulonglong, .double => return 64, | 3057 | .longlong, .ulonglong, .double => return 64, |
| 3071 | .longdouble => switch (target.cpu.arch) { | 3058 | .longdouble => switch (target.cpu.arch) { |
| 3072 | .aarch64 => switch (target.os.tag) { | 3059 | .aarch64 => return 64, |
| 3073 | .bridgeos => return 128, | ||
| 3074 | else => return 64, | ||
| 3075 | }, | ||
| 3076 | .x86 => switch (target.abi) { | 3060 | .x86 => switch (target.abi) { |
| 3077 | .android => return 64, | 3061 | .android => return 64, |
| 3078 | else => return 80, | 3062 | else => return 80, |
src/codegen/llvm.zig-3| ... | @@ -167,7 +167,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -167,7 +167,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 167 | .aix, | 167 | .aix, |
| 168 | .zos, | 168 | .zos, |
| 169 | => "ibm", | 169 | => "ibm", |
| 170 | .bridgeos, | ||
| 171 | .driverkit, | 170 | .driverkit, |
| 172 | .ios, | 171 | .ios, |
| 173 | .macos, | 172 | .macos, |
| ... | @@ -218,7 +217,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { | ... | @@ -218,7 +217,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { |
| 218 | .hurd => "hurd", | 217 | .hurd => "hurd", |
| 219 | .wasi => "wasi", | 218 | .wasi => "wasi", |
| 220 | .emscripten => "emscripten", | 219 | .emscripten => "emscripten", |
| 221 | .bridgeos => "bridgeos", | ||
| 222 | .macos => "macosx", | 220 | .macos => "macosx", |
| 223 | .ios => "ios", | 221 | .ios => "ios", |
| 224 | .tvos => "tvos", | 222 | .tvos => "tvos", |
| ... | @@ -340,7 +338,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { | ... | @@ -340,7 +338,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 340 | .driverkit => .DriverKit, | 338 | .driverkit => .DriverKit, |
| 341 | .vulkan => .Vulkan, | 339 | .vulkan => .Vulkan, |
| 342 | .serenity => .Serenity, | 340 | .serenity => .Serenity, |
| 343 | .bridgeos => .BridgeOS, | ||
| 344 | 341 | ||
| 345 | .opengl, | 342 | .opengl, |
| 346 | .plan9, | 343 | .plan9, |
src/link/MachO.zig+2-9| ... | @@ -3539,7 +3539,7 @@ pub fn requiresCodeSig(self: MachO) bool { | ... | @@ -3539,7 +3539,7 @@ pub fn requiresCodeSig(self: MachO) bool { |
| 3539 | const target = self.getTarget(); | 3539 | const target = self.getTarget(); |
| 3540 | return switch (target.cpu.arch) { | 3540 | return switch (target.cpu.arch) { |
| 3541 | .aarch64 => switch (target.os.tag) { | 3541 | .aarch64 => switch (target.os.tag) { |
| 3542 | .bridgeos, .driverkit, .macos => true, | 3542 | .driverkit, .macos => true, |
| 3543 | .ios, .tvos, .visionos, .watchos => target.abi == .simulator, | 3543 | .ios, .tvos, .visionos, .watchos => target.abi == .simulator, |
| 3544 | else => false, | 3544 | else => false, |
| 3545 | }, | 3545 | }, |
| ... | @@ -4143,7 +4143,6 @@ pub const Platform = struct { | ... | @@ -4143,7 +4143,6 @@ pub const Platform = struct { |
| 4143 | const cmd = lc.cast(macho.build_version_command).?; | 4143 | const cmd = lc.cast(macho.build_version_command).?; |
| 4144 | return .{ | 4144 | return .{ |
| 4145 | .os_tag = switch (cmd.platform) { | 4145 | .os_tag = switch (cmd.platform) { |
| 4146 | .BRIDGEOS => .bridgeos, | ||
| 4147 | .DRIVERKIT => .driverkit, | 4146 | .DRIVERKIT => .driverkit, |
| 4148 | .IOS, .IOSSIMULATOR => .ios, | 4147 | .IOS, .IOSSIMULATOR => .ios, |
| 4149 | .MACCATALYST => .ios, | 4148 | .MACCATALYST => .ios, |
| ... | @@ -4191,11 +4190,7 @@ pub const Platform = struct { | ... | @@ -4191,11 +4190,7 @@ pub const Platform = struct { |
| 4191 | return .{ | 4190 | return .{ |
| 4192 | .os_tag = target.os.tag, | 4191 | .os_tag = target.os.tag, |
| 4193 | .abi = target.abi, | 4192 | .abi = target.abi, |
| 4194 | // This should use semver once we determine the version history. | 4193 | .version = target.os.version_range.semver.min, |
| 4195 | .version = if (target.os.tag == .bridgeos) | ||
| 4196 | .{ .major = 0, .minor = 0, .patch = 0 } | ||
| 4197 | else | ||
| 4198 | target.os.version_range.semver.min, | ||
| 4199 | }; | 4194 | }; |
| 4200 | } | 4195 | } |
| 4201 | 4196 | ||
| ... | @@ -4205,7 +4200,6 @@ pub const Platform = struct { | ... | @@ -4205,7 +4200,6 @@ pub const Platform = struct { |
| 4205 | 4200 | ||
| 4206 | pub fn toApplePlatform(plat: Platform) macho.PLATFORM { | 4201 | pub fn toApplePlatform(plat: Platform) macho.PLATFORM { |
| 4207 | return switch (plat.os_tag) { | 4202 | return switch (plat.os_tag) { |
| 4208 | .bridgeos => .BRIDGEOS, | ||
| 4209 | .driverkit => .DRIVERKIT, | 4203 | .driverkit => .DRIVERKIT, |
| 4210 | .ios => switch (plat.abi) { | 4204 | .ios => switch (plat.abi) { |
| 4211 | .macabi => .MACCATALYST, | 4205 | .macabi => .MACCATALYST, |
| ... | @@ -4284,7 +4278,6 @@ const SupportedPlatforms = struct { | ... | @@ -4284,7 +4278,6 @@ const SupportedPlatforms = struct { |
| 4284 | // Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L52 | 4278 | // Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L52 |
| 4285 | // zig fmt: off | 4279 | // zig fmt: off |
| 4286 | const supported_platforms = [_]SupportedPlatforms{ | 4280 | const supported_platforms = [_]SupportedPlatforms{ |
| 4287 | .{ .bridgeos, .none, 0x010000, 0x010000 }, | ||
| 4288 | .{ .driverkit, .none, 0x130000, 0x130000 }, | 4281 | .{ .driverkit, .none, 0x130000, 0x130000 }, |
| 4289 | .{ .ios, .none, 0x0C0000, 0x070000 }, | 4282 | .{ .ios, .none, 0x0C0000, 0x070000 }, |
| 4290 | .{ .ios, .macabi, 0x0D0000, 0x0D0000 }, | 4283 | .{ .ios, .macabi, 0x0D0000, 0x0D0000 }, |
test/llvm_targets.zig-1| ... | @@ -2,7 +2,6 @@ const std = @import("std"); | ... | @@ -2,7 +2,6 @@ const std = @import("std"); |
| 2 | const Cases = @import("src/Cases.zig"); | 2 | const Cases = @import("src/Cases.zig"); |
| 3 | 3 | ||
| 4 | const targets = [_]std.Target.Query{ | 4 | const targets = [_]std.Target.Query{ |
| 5 | .{ .cpu_arch = .aarch64, .os_tag = .bridgeos, .abi = .none }, | ||
| 6 | .{ .cpu_arch = .aarch64, .os_tag = .driverkit, .abi = .none }, | 5 | .{ .cpu_arch = .aarch64, .os_tag = .driverkit, .abi = .none }, |
| 7 | .{ .cpu_arch = .aarch64, .os_tag = .freebsd, .abi = .none }, | 6 | .{ .cpu_arch = .aarch64, .os_tag = .freebsd, .abi = .none }, |
| 8 | .{ .cpu_arch = .aarch64, .os_tag = .freestanding, .abi = .none }, | 7 | .{ .cpu_arch = .aarch64, .os_tag = .freestanding, .abi = .none }, |