@@ -947,8 +947,8 @@ if run_os in ('maccatalyst',):
947
947
target_os_abi = 'macosx'
948
948
target_os_is_maccatalyst = "TRUE"
949
949
config .available_features .add ("OS=ios" )
950
- # macOS on ASi uses the stable ABI
951
- if run_os in ('macosx' ,) and run_cpu in ('arm64' ,):
950
+ # macOS and simulators on ASi use the stable ABI
951
+ if ( run_os in ('macosx' ,) or 'simulator' in run_environment ) and run_cpu in ('arm64' ,):
952
952
target_mandates_stable_abi = "TRUE"
953
953
config .available_features .add ('swift_only_stable_abi' )
954
954
if run_os in (
@@ -1186,13 +1186,13 @@ if run_vendor == 'apple':
1186
1186
target_future_version = ''
1187
1187
1188
1188
# Only permit non-executable tests for ARM on Darwin unless you are on macOS
1189
- if 'arm' in run_cpu and run_os not in ('macosx' ,):
1189
+ if 'simulator' not in run_environment and run_os not in ('macosx' ,):
1190
1190
if swift_test_mode != 'only_non_executable' :
1191
1191
raise RuntimeError ('Device tests are currently only supported when '
1192
1192
'the swift_test_mode is "only_non_executable". Current '
1193
1193
'swift_test_mode is {}.' .format (swift_test_mode ))
1194
1194
1195
- if 'arm' in run_cpu and not (run_os == 'macosx' or run_os == 'maccatalyst' ):
1195
+ if 'simulator' not in run_environment and not (run_os == 'macosx' or run_os == 'maccatalyst' ):
1196
1196
# iOS/tvOS/watchOS device
1197
1197
if run_os == 'ios' :
1198
1198
lit_config .note ('Testing iOS ' + config .variant_triple )
@@ -1231,7 +1231,7 @@ if run_vendor == 'apple':
1231
1231
(sw_vers_name , sw_vers_vers , sw_vers_build ) = \
1232
1232
darwin_get_sdk_version (config .variant_sdk )
1233
1233
1234
- elif run_os == 'ios' or run_os == 'tvos' or run_os == 'watchos' :
1234
+ elif 'simulator' in run_environment :
1235
1235
# iOS/tvOS/watchOS simulator
1236
1236
if run_os == 'ios' :
1237
1237
config .available_features .add ('DARWIN_SIMULATOR=ios' )
0 commit comments