authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-08-29 12:14:57+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-08-29 12:14:57+02:00
log1cae41bbbb3cb1cf10bfa808ecbe289bfb4d5180
tree4e8e9fb12e33530109b7bef8a68e7a3855e411b8
parent1b01715a73b4156b3cb761d77d09c30791b8027c

macho: clean up array of supported platforms and versions


1 files changed, 9 insertions(+), 8 deletions(-)

src/link/MachO/load_commands.zig+9-8
......@@ -390,19 +390,20 @@ const SupportedPlatforms = struct {
390390 std.Target.Abi,
391391 u32, // Min platform version for which to emit LC_BUILD_VERSION
392392 u32, // Min supported platform version
393 ?[]const u8, // Env var to look for
394393};
395394
396395// Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L52
396// zig fmt: off
397397const supported_platforms = [_]SupportedPlatforms{
398 .{ .macos, .none, 0xA0E00, 0xA0800, "MACOSX_DEPLOYMENT_TARGET" },
399 .{ .ios, .none, 0xC0000, 0x70000, "IPHONEOS_DEPLOYMENT_TARGET" },
400 .{ .tvos, .none, 0xC0000, 0x70000, "TVOS_DEPLOYMENT_TARGET" },
401 .{ .watchos, .none, 0x50000, 0x20000, "WATCHOS_DEPLOYMENT_TARGET" },
402 .{ .ios, .simulator, 0xD0000, 0x80000, null },
403 .{ .tvos, .simulator, 0xD0000, 0x80000, null },
404 .{ .watchos, .simulator, 0x60000, 0x20000, null },
398 .{ .macos, .none, 0xA0E00, 0xA0800 },
399 .{ .ios, .none, 0xC0000, 0x70000 },
400 .{ .tvos, .none, 0xC0000, 0x70000 },
401 .{ .watchos, .none, 0x50000, 0x20000 },
402 .{ .ios, .simulator, 0xD0000, 0x80000 },
403 .{ .tvos, .simulator, 0xD0000, 0x80000 },
404 .{ .watchos, .simulator, 0x60000, 0x20000 },
405405};
406// zig fmt: on
406407
407408pub inline fn semanticVersionToAppleVersion(version: std.SemanticVersion) u32 {
408409 const major = version.major;