@@ -835,6 +835,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
835835 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
836836 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
837837 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
838+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
838839 " -target " , defaultTargetTriple,
839840 " -Xlinker " , " -add_ast_path " , " -Xlinker " ,
840841 buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -1150,6 +1151,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
11501151 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
11511152 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
11521153 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1154+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
11531155 " -target " , defaultTargetTriple,
11541156 " -g " ,
11551157 ] )
@@ -1244,6 +1246,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
12441246 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
12451247 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
12461248 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1249+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
12471250 " -target " , defaultTargetTriple,
12481251 " -g " ,
12491252 ] )
@@ -1794,6 +1797,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
17941797 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
17951798 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
17961799 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1800+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
17971801 " -target " , defaultTargetTriple,
17981802 " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/exe.build/exe.swiftmodule " ,
17991803 " -g " ,
@@ -2353,11 +2357,12 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
23532357
23542358 #if os(macOS)
23552359 let version = MinimumDeploymentTarget . computeXCTestMinimumDeploymentTarget ( for: . macOS) . versionString
2356- let rpathsForBackdeployment : [ String ]
2360+ var rpathsForBackdeployment : [ String ] = [ ]
23572361 if let version = try ? Version ( string: version, lenient: true ) , version. major < 12 {
2358- rpathsForBackdeployment = [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ]
2359- } else {
2360- rpathsForBackdeployment = [ ]
2362+ rpathsForBackdeployment += [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ]
2363+ }
2364+ if let version = try ? Version ( string: version, lenient: true ) , version. major < 26 {
2365+ rpathsForBackdeployment += [ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ]
23612366 }
23622367 XCTAssertEqual (
23632368 try result. buildProduct ( for: " PkgPackageTests " ) . linkArguments ( ) ,
@@ -2475,6 +2480,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
24752480 " -Xlinker " , " -dead_strip " ,
24762481 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
24772482 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
2483+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
24782484 " -target " , hostTriple. tripleString ( forPlatformVersion: " 12.0 " ) ,
24792485 " -g " ,
24802486 ] )
@@ -2846,6 +2852,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
28462852 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
28472853 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
28482854 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
2855+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
28492856 " -target " , defaultTargetTriple,
28502857 " -Xlinker " , " -add_ast_path " ,
28512858 " -Xlinker " , buildPath. appending ( components: " exe.build " , " exe.swiftmodule " ) . pathString,
@@ -2992,6 +2999,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
29922999 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
29933000 " @ \( buildPath. appending ( components: " Foo.product " , " Objects.LinkFileList " ) ) " ,
29943001 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3002+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
29953003 " -target " , defaultTargetTriple,
29963004 " -Xlinker " , " -add_ast_path " ,
29973005 " -Xlinker " , buildPath. appending ( components: " Foo.build " , " Foo.swiftmodule " ) . pathString,
@@ -3009,6 +3017,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
30093017 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
30103018 " @ \( buildPath. appending ( components: " Bar-Baz.product " , " Objects.LinkFileList " ) ) " ,
30113019 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3020+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
30123021 " -target " , defaultTargetTriple,
30133022 " -Xlinker " , " -add_ast_path " ,
30143023 " -Xlinker " , buildPath. appending ( components: " Modules " , " Bar.swiftmodule " ) . pathString,
@@ -3165,6 +3174,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
31653174 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
31663175 " @ \( buildPath. appending ( components: " lib.product " , " Objects.LinkFileList " ) ) " ,
31673176 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3177+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
31683178 " -target " , defaultTargetTriple,
31693179 " -Xlinker " , " -add_ast_path " , " -Xlinker " ,
31703180 buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -7295,6 +7305,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
72957305 " -emit-executable " ,
72967306 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
72977307 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
7308+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
72987309 " -target " , defaultTargetTriple,
72997310 " -Xlinker " , " -add_ast_path " ,
73007311 " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
0 commit comments