| ... | ... | @@ -2736,14 +2736,15 @@ fn populateMetadata(self: *MachO) !void { |
| 2736 | 2736 | )); |
| 2737 | 2737 | const ver = self.base.options.target.os.version_range.semver.min; |
| 2738 | 2738 | const version = ver.major << 16 | ver.minor << 8 | ver.patch; |
| 2739 | const is_simulator_abi = self.base.options.target.abi == .simulator; |
| 2739 | 2740 | var cmd = commands.emptyGenericCommandWithData(macho.build_version_command{ |
| 2740 | 2741 | .cmd = macho.LC_BUILD_VERSION, |
| 2741 | 2742 | .cmdsize = cmdsize, |
| 2742 | 2743 | .platform = switch (self.base.options.target.os.tag) { |
| 2743 | 2744 | .macos => macho.PLATFORM_MACOS, |
| 2744 | | .ios => macho.PLATFORM_IOSSIMULATOR, |
| 2745 | | .watchos => macho.PLATFORM_WATCHOS, |
| 2746 | | .tvos => macho.PLATFORM_TVOS, |
| 2745 | .ios => if (is_simulator_abi) macho.PLATFORM_IOSSIMULATOR else macho.PLATFORM_IOS, |
| 2746 | .watchos => if (is_simulator_abi) macho.PLATFORM_WATCHOSSIMULATOR else macho.PLATFORM_WATCHOS, |
| 2747 | .tvos => if (is_simulator_abi) macho.PLATFORM_TVOSSIMULATOR else macho.PLATFORM_TVOS, |
| 2747 | 2748 | else => unreachable, |
| 2748 | 2749 | }, |
| 2749 | 2750 | .minos = version, |
| ... | ... | @@ -4355,14 +4356,15 @@ pub fn populateMissingMetadata(self: *MachO) !void { |
| 4355 | 4356 | )); |
| 4356 | 4357 | const ver = self.base.options.target.os.version_range.semver.min; |
| 4357 | 4358 | const version = ver.major << 16 | ver.minor << 8 | ver.patch; |
| 4359 | const is_simulator_abi = self.base.options.target.abi == .simulator; |
| 4358 | 4360 | var cmd = commands.emptyGenericCommandWithData(macho.build_version_command{ |
| 4359 | 4361 | .cmd = macho.LC_BUILD_VERSION, |
| 4360 | 4362 | .cmdsize = cmdsize, |
| 4361 | 4363 | .platform = switch (self.base.options.target.os.tag) { |
| 4362 | 4364 | .macos => macho.PLATFORM_MACOS, |
| 4363 | | .ios => macho.PLATFORM_IOSSIMULATOR, |
| 4364 | | .watchos => macho.PLATFORM_WATCHOS, |
| 4365 | | .tvos => macho.PLATFORM_TVOS, |
| 4365 | .ios => if (is_simulator_abi) macho.PLATFORM_IOSSIMULATOR else macho.PLATFORM_IOS, |
| 4366 | .watchos => if (is_simulator_abi) macho.PLATFORM_WATCHOSSIMULATOR else macho.PLATFORM_WATCHOS, |
| 4367 | .tvos => if (is_simulator_abi) macho.PLATFORM_TVOSSIMULATOR else macho.PLATFORM_TVOS, |
| 4366 | 4368 | else => unreachable, |
| 4367 | 4369 | }, |
| 4368 | 4370 | .minos = version, |