@@ -691,6 +691,8 @@ static PlatformVersion parsePlatformVersion(const Arg *arg) {
691
691
.Cases (" tvos-simulator" , " 8" , PLATFORM_TVOSSIMULATOR)
692
692
.Cases (" watchos-simulator" , " 9" , PLATFORM_WATCHOSSIMULATOR)
693
693
.Cases (" driverkit" , " 10" , PLATFORM_DRIVERKIT)
694
+ .Cases (" xros" , " 11" , PLATFORM_XROS)
695
+ .Cases (" xros-simulator" , " 12" , PLATFORM_XROS_SIMULATOR)
694
696
.Default (PLATFORM_UNKNOWN);
695
697
if (platformVersion.platform == PLATFORM_UNKNOWN)
696
698
error (Twine (" malformed platform: " ) + platformStr);
@@ -985,6 +987,8 @@ PlatformType macho::removeSimulator(PlatformType platform) {
985
987
return PLATFORM_TVOS;
986
988
case PLATFORM_WATCHOSSIMULATOR:
987
989
return PLATFORM_WATCHOS;
990
+ case PLATFORM_XROS_SIMULATOR:
991
+ return PLATFORM_XROS;
988
992
default :
989
993
return platform;
990
994
}
@@ -1001,15 +1005,17 @@ static bool shouldAdhocSignByDefault(Architecture arch, PlatformType platform) {
1001
1005
1002
1006
return platform == PLATFORM_MACOS || platform == PLATFORM_IOSSIMULATOR ||
1003
1007
platform == PLATFORM_TVOSSIMULATOR ||
1004
- platform == PLATFORM_WATCHOSSIMULATOR;
1008
+ platform == PLATFORM_WATCHOSSIMULATOR ||
1009
+ platform == PLATFORM_XROS_SIMULATOR;
1005
1010
}
1006
1011
1007
1012
static bool dataConstDefault (const InputArgList &args) {
1008
- static const std::array<std::pair<PlatformType, VersionTuple>, 5 > minVersion =
1013
+ static const std::array<std::pair<PlatformType, VersionTuple>, 6 > minVersion =
1009
1014
{{{PLATFORM_MACOS, VersionTuple (10 , 15 )},
1010
1015
{PLATFORM_IOS, VersionTuple (13 , 0 )},
1011
1016
{PLATFORM_TVOS, VersionTuple (13 , 0 )},
1012
1017
{PLATFORM_WATCHOS, VersionTuple (6 , 0 )},
1018
+ {PLATFORM_XROS, VersionTuple (1 , 0 )},
1013
1019
{PLATFORM_BRIDGEOS, VersionTuple (4 , 0 )}}};
1014
1020
PlatformType platform = removeSimulator (config->platformInfo .target .Platform );
1015
1021
auto it = llvm::find_if (minVersion,
@@ -1045,11 +1051,12 @@ static bool shouldEmitChainedFixups(const InputArgList &args) {
1045
1051
bool isRequested = arg != nullptr ;
1046
1052
1047
1053
// Version numbers taken from the Xcode 13.3 release notes.
1048
- static const std::array<std::pair<PlatformType, VersionTuple>, 4 > minVersion =
1054
+ static const std::array<std::pair<PlatformType, VersionTuple>, 5 > minVersion =
1049
1055
{{{PLATFORM_MACOS, VersionTuple (11 , 0 )},
1050
1056
{PLATFORM_IOS, VersionTuple (13 , 4 )},
1051
1057
{PLATFORM_TVOS, VersionTuple (14 , 0 )},
1052
- {PLATFORM_WATCHOS, VersionTuple (7 , 0 )}}};
1058
+ {PLATFORM_WATCHOS, VersionTuple (7 , 0 )},
1059
+ {PLATFORM_XROS, VersionTuple (1 , 0 )}}};
1053
1060
PlatformType platform = removeSimulator (config->platformInfo .target .Platform );
1054
1061
auto it = llvm::find_if (minVersion,
1055
1062
[&](const auto &p) { return p.first == platform; });
@@ -1688,8 +1695,8 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
1688
1695
if (args.getLastArg (OPT_reproducible))
1689
1696
config->zeroModTime = true ;
1690
1697
1691
- std::array<PlatformType, 3 > encryptablePlatforms{
1692
- PLATFORM_IOS, PLATFORM_WATCHOS, PLATFORM_TVOS};
1698
+ std::array<PlatformType, 4 > encryptablePlatforms{
1699
+ PLATFORM_IOS, PLATFORM_WATCHOS, PLATFORM_TVOS, PLATFORM_XROS };
1693
1700
config->emitEncryptionInfo =
1694
1701
args.hasFlag (OPT_encryptable, OPT_no_encryption,
1695
1702
is_contained (encryptablePlatforms, config->platform ()));
0 commit comments