@@ -834,6 +834,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
834
834
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
835
835
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
836
836
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
837
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
837
838
" -target " , defaultTargetTriple,
838
839
" -Xlinker " , " -add_ast_path " , " -Xlinker " ,
839
840
buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -1149,6 +1150,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
1149
1150
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
1150
1151
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
1151
1152
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1153
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
1152
1154
" -target " , defaultTargetTriple,
1153
1155
" -g " ,
1154
1156
] )
@@ -1243,6 +1245,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
1243
1245
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
1244
1246
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
1245
1247
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1248
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
1246
1249
" -target " , defaultTargetTriple,
1247
1250
" -g " ,
1248
1251
] )
@@ -1793,6 +1796,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
1793
1796
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
1794
1797
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
1795
1798
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1799
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
1796
1800
" -target " , defaultTargetTriple,
1797
1801
" -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/exe.build/exe.swiftmodule " ,
1798
1802
" -g " ,
@@ -2352,11 +2356,12 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
2352
2356
2353
2357
#if os(macOS)
2354
2358
let version = MinimumDeploymentTarget . computeXCTestMinimumDeploymentTarget ( for: . macOS) . versionString
2355
- let rpathsForBackdeployment : [ String ]
2359
+ var rpathsForBackdeployment : [ String ] = [ ]
2356
2360
if let version = try ? Version ( string: version, lenient: true ) , version. major < 12 {
2357
- rpathsForBackdeployment = [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ]
2358
- } else {
2359
- rpathsForBackdeployment = [ ]
2361
+ rpathsForBackdeployment += [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ]
2362
+ }
2363
+ if let version = try ? Version ( string: version, lenient: true ) , version. major < 26 {
2364
+ rpathsForBackdeployment += [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ]
2360
2365
}
2361
2366
XCTAssertEqual (
2362
2367
try result. buildProduct ( for: " PkgPackageTests " ) . linkArguments ( ) ,
@@ -2474,6 +2479,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
2474
2479
" -Xlinker " , " -dead_strip " ,
2475
2480
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
2476
2481
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
2482
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
2477
2483
" -target " , hostTriple. tripleString ( forPlatformVersion: " 12.0 " ) ,
2478
2484
" -g " ,
2479
2485
] )
@@ -2845,6 +2851,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
2845
2851
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
2846
2852
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
2847
2853
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
2854
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
2848
2855
" -target " , defaultTargetTriple,
2849
2856
" -Xlinker " , " -add_ast_path " ,
2850
2857
" -Xlinker " , buildPath. appending ( components: " exe.build " , " exe.swiftmodule " ) . pathString,
@@ -2991,6 +2998,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
2991
2998
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
2992
2999
" @ \( buildPath. appending ( components: " Foo.product " , " Objects.LinkFileList " ) ) " ,
2993
3000
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3001
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
2994
3002
" -target " , defaultTargetTriple,
2995
3003
" -Xlinker " , " -add_ast_path " ,
2996
3004
" -Xlinker " , buildPath. appending ( components: " Foo.build " , " Foo.swiftmodule " ) . pathString,
@@ -3008,6 +3016,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
3008
3016
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
3009
3017
" @ \( buildPath. appending ( components: " Bar-Baz.product " , " Objects.LinkFileList " ) ) " ,
3010
3018
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3019
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
3011
3020
" -target " , defaultTargetTriple,
3012
3021
" -Xlinker " , " -add_ast_path " ,
3013
3022
" -Xlinker " , buildPath. appending ( components: " Modules " , " Bar.swiftmodule " ) . pathString,
@@ -3164,6 +3173,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
3164
3173
" -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
3165
3174
" @ \( buildPath. appending ( components: " lib.product " , " Objects.LinkFileList " ) ) " ,
3166
3175
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3176
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
3167
3177
" -target " , defaultTargetTriple,
3168
3178
" -Xlinker " , " -add_ast_path " , " -Xlinker " ,
3169
3179
buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -7294,6 +7304,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
7294
7304
" -emit-executable " ,
7295
7305
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
7296
7306
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
7307
+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
7297
7308
" -target " , defaultTargetTriple,
7298
7309
" -Xlinker " , " -add_ast_path " ,
7299
7310
" -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
0 commit comments