@@ -132,7 +132,7 @@ index 510c7b9568a..810b08879f6 100644
132
132
import _osx_support
133
133
osname, release, machine = _osx_support.get_platform_osx(
134
134
diff --git a/Misc/platform_triplet.c b/Misc/platform_triplet.c
135
- index ec0857a4a99..2350e9dc821 100644
135
+ index f5cd73bdea8..50f2f8988b7 100644
136
136
--- a/Misc/platform_triplet.c
137
137
+++ b/Misc/platform_triplet.c
138
138
@@ -257,6 +257,26 @@
@@ -1269,150 +1269,19 @@ index c3e261ecd9e..26ef7a95de4 100644
1269
1269
<key>CFBundleSupportedPlatforms</key>
1270
1270
<array>
1271
1271
<string>iPhoneOS</string>
1272
- diff --git a/iOS/Resources/bin/arm64-apple-ios-clang b/iOS/Resources/bin/arm64-apple-ios-clang
1273
- index c39519cd1f8..f50d5b5142f 100755
1274
- --- a/iOS/Resources/bin/arm64-apple-ios-clang
1275
- +++ b/iOS/Resources/bin/arm64-apple-ios-clang
1276
- @@ -1,2 +1,2 @@
1277
- #!/bin/sh
1278
- - xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios "$@"
1279
- + xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} "$@"
1280
- diff --git a/iOS/Resources/bin/arm64-apple-ios-clang++ b/iOS/Resources/bin/arm64-apple-ios-clang++
1281
- index d9b12925f38..0794731d7dc 100755
1282
- --- a/iOS/Resources/bin/arm64-apple-ios-clang++
1283
- +++ b/iOS/Resources/bin/arm64-apple-ios-clang++
1284
- @@ -1,2 +1,2 @@
1285
- #!/bin/sh
1286
- - xcrun --sdk iphoneos${IOS_SDK_VERSION} clang++ -target arm64-apple-ios "$@"
1287
- + xcrun --sdk iphoneos${IOS_SDK_VERSION} clang++ -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} "$@"
1288
- diff --git a/iOS/Resources/bin/arm64-apple-ios-cpp b/iOS/Resources/bin/arm64-apple-ios-cpp
1289
- index 24da23d3448..24fa1506bab 100755
1290
- --- a/iOS/Resources/bin/arm64-apple-ios-cpp
1291
- +++ b/iOS/Resources/bin/arm64-apple-ios-cpp
1292
- @@ -1,2 +1,2 @@
1293
- #!/bin/sh
1294
- - xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios -E "$@"
1295
- + xcrun --sdk iphoneos${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET} -E "$@"
1296
- diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-clang b/iOS/Resources/bin/arm64-apple-ios-simulator-clang
1297
- index 92e8d853d6e..4891a00876e 100755
1298
- --- a/iOS/Resources/bin/arm64-apple-ios-simulator-clang
1299
- +++ b/iOS/Resources/bin/arm64-apple-ios-simulator-clang
1300
- @@ -1,2 +1,2 @@
1301
- #!/bin/sh
1302
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios-simulator "$@"
1303
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@"
1304
- diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-clang++ b/iOS/Resources/bin/arm64-apple-ios-simulator-clang++
1305
- index 076469cc70c..58b2a5f6f18 100755
1306
- --- a/iOS/Resources/bin/arm64-apple-ios-simulator-clang++
1307
- +++ b/iOS/Resources/bin/arm64-apple-ios-simulator-clang++
1308
- @@ -1,2 +1,2 @@
1309
- #!/bin/sh
1310
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target arm64-apple-ios-simulator "$@"
1311
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@"
1312
- diff --git a/iOS/Resources/bin/arm64-apple-ios-simulator-cpp b/iOS/Resources/bin/arm64-apple-ios-simulator-cpp
1313
- index c57f28cee5b..c9df94e8b7c 100755
1314
- --- a/iOS/Resources/bin/arm64-apple-ios-simulator-cpp
1315
- +++ b/iOS/Resources/bin/arm64-apple-ios-simulator-cpp
1316
- @@ -1,2 +1,2 @@
1317
- #!/bin/sh
1318
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios-simulator -E "$@"
1319
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target arm64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator -E "$@"
1320
- diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang
1321
- index 17cbe0c8a1e..f4739a7b945 100755
1322
- --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang
1323
- +++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang
1324
- @@ -1,2 +1,2 @@
1325
- #!/bin/sh
1326
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios-simulator "$@"
1327
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@"
1328
- diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++
1329
- index 565d47b24c2..c348ae4c103 100755
1330
- --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++
1331
- +++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-clang++
1332
- @@ -1,2 +1,2 @@
1333
- #!/bin/sh
1334
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target x86_64-apple-ios-simulator "$@"
1335
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang++ -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator "$@"
1336
- diff --git a/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp b/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp
1337
- index 63fc8e8de2d..6d7f8084c9f 100755
1338
- --- a/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp
1339
- +++ b/iOS/Resources/bin/x86_64-apple-ios-simulator-cpp
1340
- @@ -1,2 +1,2 @@
1341
- #!/bin/sh
1342
- - xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios-simulator -E "$@"
1343
- + xcrun --sdk iphonesimulator${IOS_SDK_VERSION} clang -target x86_64-apple-ios${IPHONEOS_DEPLOYMENT_TARGET}-simulator -E "$@"
1344
1272
diff --git a/iOS/testbed/__main__.py b/iOS/testbed/__main__.py
1345
- index b436c9af99d..c05497ede3a 100644
1273
+ index c05497ede3a..1146bf3b988 100644
1346
1274
--- a/iOS/testbed/__main__.py
1347
1275
+++ b/iOS/testbed/__main__.py
1348
- @@ -123,6 +123,36 @@
1349
- )
1350
-
1351
-
1352
- + # Select a simulator device to use.
1353
- + async def select_simulator_device():
1354
- + # List the testing simulators, in JSON format
1355
- + raw_json = await async_check_output(
1356
- + "xcrun", "simctl", "--set", "testing", "list", "-j"
1357
- + )
1358
- + json_data = json.loads(raw_json)
1359
- +
1360
- + # Any device will do; we'll look for "SE" devices - but the name isn't
1361
- + # consistent over time. Older Xcode versions will use "iPhone SE (Nth
1362
- + # generation)"; As of 2025, they've started using "iPhone 16e".
1363
- + #
1364
- + # When Xcode is updated after a new release, new devices will be available
1365
- + # and old ones will be dropped from the set available on the latest iOS
1366
- + # version. Select the one with the highest minimum runtime version - this
1367
- + # is an indicator of the "newest" released device, which should always be
1368
- + # supported on the "most recent" iOS version.
1369
- + se_simulators = sorted(
1370
- + (devicetype["minRuntimeVersion"], devicetype["name"])
1371
- + for devicetype in json_data["devicetypes"]
1372
- + if devicetype["productFamily"] == "iPhone"
1373
- + and (
1374
- + ("iPhone " in devicetype["name"] and devicetype["name"].endswith("e"))
1375
- + or "iPhone SE " in devicetype["name"]
1376
- + )
1377
- + )
1378
- +
1379
- + return se_simulators[-1][1]
1380
- +
1381
- +
1382
- # Return a list of UDIDs associated with booted simulators
1383
- async def list_devices():
1384
- try:
1385
- @@ -371,12 +401,16 @@
1386
- plistlib.dump(info, f)
1387
-
1388
-
1389
- - async def run_testbed(simulator: str, args: list[str], verbose: bool=False):
1390
- + async def run_testbed(simulator: str | None, args: list[str], verbose: bool=False):
1391
- location = Path(__file__).parent
1392
- print("Updating plist...", end="", flush=True)
1393
- update_plist(location, args)
1394
- print(" done.", flush=True)
1395
-
1396
- + if simulator is None:
1397
- + simulator = await select_simulator_device()
1398
- + print(f"Running test on {simulator}", flush=True)
1399
- +
1400
- # We need to get an exclusive lock on simulator creation, to avoid issues
1401
- # with multiple simulators starting and being unable to tell which
1402
- # simulator is due to which testbed instance. See
1403
- @@ -453,8 +487,10 @@
1404
- )
1405
- run.add_argument(
1406
- "--simulator",
1407
- - default="iPhone SE (3rd Generation)",
1408
- - help="The name of the simulator to use (default: 'iPhone SE (3rd Generation)')",
1409
- + help=(
1410
- + "The name of the simulator to use (eg: 'iPhone 16e'). Defaults to ",
1411
- + "the most recently released 'entry level' iPhone device."
1412
- + )
1276
+ @@ -127,7 +127,7 @@
1277
+ async def select_simulator_device():
1278
+ # List the testing simulators, in JSON format
1279
+ raw_json = await async_check_output(
1280
+ - "xcrun", "simctl", "--set", "testing", "list", "-j"
1281
+ + "xcrun", "simctl", "list", "-j"
1413
1282
)
1414
- run.add_argument(
1415
- "-v", "--verbose",
1283
+ json_data = json.loads(raw_json)
1284
+
1416
1285
--- /dev/null
1417
1286
+++ b/tvOS/README.rst
1418
1287
@@ -0,0 +1,108 @@
0 commit comments