@@ -2303,6 +2303,40 @@ if run_vendor == 'apple':
2303
2303
if not os .path .isdir (concurrency_back_deploy_path ):
2304
2304
lit_config .fatal (f"Concurrency back deploy libraries not found at { concurrency_back_deploy_path } " )
2305
2305
2306
+ compatibility_span_back_deploy_path = ''
2307
+ if run_vendor == 'apple' :
2308
+ COMPATIBILITY_SPAN_BACK_DEPLOY_EARLIEST_VERSIONS = {
2309
+ 'macosx' : '10.14.4' ,
2310
+ 'ios' : '12.2' ,
2311
+ 'maccatalyst' : '13.1' ,
2312
+ 'tvos' : '12.2' ,
2313
+ 'watchos' : '5.2' ,
2314
+ 'xros' : '1.0' ,
2315
+ }
2316
+
2317
+ compatibility_span_back_deploy_version = tuple (
2318
+ int (component ) for component
2319
+ in COMPATIBILITY_SPAN_BACK_DEPLOY_EARLIEST_VERSIONS .get (run_os , '' ).split ('.' ))
2320
+
2321
+ tuple_run_vers = tuple (int (component ) for component in run_vers .split ('.' ))
2322
+
2323
+ if tuple_run_vers >= compatibility_span_back_deploy_version and tuple_run_vers < (26 ,):
2324
+ config .available_features .add ('back_deploy_compatibility_span' )
2325
+ toolchain_swiftc_path = subprocess .check_output (['xcrun' , '--find' , 'swiftc' ]).rstrip ().decode ('utf-8' )
2326
+ compatibility_span_back_deploy_path = os .path .join (
2327
+ os .path .dirname (toolchain_swiftc_path ), '..' ,
2328
+ 'lib' , 'swift-6.2' , xcrun_sdk_name )
2329
+ if not os .path .isdir (compatibility_span_back_deploy_path ):
2330
+ lit_config .warning (
2331
+ "Compatibility span back deploy libraries not found at "
2332
+ f"{ compatibility_span_back_deploy_path } . Falling back to local build..." )
2333
+ compatibility_span_back_deploy_path = os .path .join (
2334
+ swift_obj_root , 'lib' , 'swift-6.2' , xcrun_sdk_name )
2335
+ if not os .path .isdir (compatibility_span_back_deploy_path ):
2336
+ lit_config .fatal (
2337
+ "Compatibility span back deploy libraries "
2338
+ f"not found at { compatibility_span_back_deploy_path } " )
2339
+
2306
2340
backtracer_path = make_path (config .swift_libexec_dir , 'swift' ,
2307
2341
config .target_sdk_name , 'swift-backtrace' )
2308
2342
config .substitutions .append (('%backtracer' , backtracer_path ))
@@ -2391,6 +2425,9 @@ def configure_remote_run():
2391
2425
if concurrency_back_deploy_path and 'use_os_stdlib' in lit_config .params :
2392
2426
upload_dylibs (concurrency_back_deploy_path )
2393
2427
2428
+ if compatibility_span_back_deploy_path and 'use_os_stdlib' in lit_config .params :
2429
+ upload_dylibs (compatibility_span_back_deploy_path )
2430
+
2394
2431
# FIXME: Uploading specific files in bin/ is not very scalable.
2395
2432
local_swift_reflection_test = lit .util .which (
2396
2433
swift_reflection_test_name , config .environment ['PATH' ])
0 commit comments