@@ -834,6 +834,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
834834 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
835835 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
836836 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
837+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
837838 " -target " , defaultTargetTriple,
838839 " -Xlinker " , " -add_ast_path " , " -Xlinker " ,
839840 buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -1149,6 +1150,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
11491150 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
11501151 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
11511152 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1153+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
11521154 " -target " , defaultTargetTriple,
11531155 " -g " ,
11541156 ] )
@@ -1243,6 +1245,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
12431245 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
12441246 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
12451247 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1248+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
12461249 " -target " , defaultTargetTriple,
12471250 " -g " ,
12481251 ] )
@@ -1793,6 +1796,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
17931796 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
17941797 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
17951798 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
1799+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
17961800 " -target " , defaultTargetTriple,
17971801 " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/ \( result. plan. destinationBuildParameters. triple) /debug/exe.build/exe.swiftmodule " ,
17981802 " -g " ,
@@ -2352,11 +2356,12 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
23522356
23532357 #if os(macOS)
23542358 let version = MinimumDeploymentTarget . computeXCTestMinimumDeploymentTarget ( for: . macOS) . versionString
2355- let rpathsForBackdeployment : [ String ]
2359+ var rpathsForBackdeployment : [ String ] = [ ]
23562360 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 " ]
23602365 }
23612366 XCTAssertEqual (
23622367 try result. buildProduct ( for: " PkgPackageTests " ) . linkArguments ( ) ,
@@ -2474,6 +2479,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
24742479 " -Xlinker " , " -dead_strip " ,
24752480 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
24762481 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
2482+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
24772483 " -target " , hostTriple. tripleString ( forPlatformVersion: " 12.0 " ) ,
24782484 " -g " ,
24792485 ] )
@@ -2845,6 +2851,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
28452851 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
28462852 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
28472853 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
2854+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
28482855 " -target " , defaultTargetTriple,
28492856 " -Xlinker " , " -add_ast_path " ,
28502857 " -Xlinker " , buildPath. appending ( components: " exe.build " , " exe.swiftmodule " ) . pathString,
@@ -2991,6 +2998,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
29912998 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
29922999 " @ \( buildPath. appending ( components: " Foo.product " , " Objects.LinkFileList " ) ) " ,
29933000 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3001+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
29943002 " -target " , defaultTargetTriple,
29953003 " -Xlinker " , " -add_ast_path " ,
29963004 " -Xlinker " , buildPath. appending ( components: " Foo.build " , " Foo.swiftmodule " ) . pathString,
@@ -3008,6 +3016,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
30083016 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
30093017 " @ \( buildPath. appending ( components: " Bar-Baz.product " , " Objects.LinkFileList " ) ) " ,
30103018 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3019+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
30113020 " -target " , defaultTargetTriple,
30123021 " -Xlinker " , " -add_ast_path " ,
30133022 " -Xlinker " , buildPath. appending ( components: " Modules " , " Bar.swiftmodule " ) . pathString,
@@ -3164,6 +3173,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
31643173 " -Xlinker " , " -rpath " , " -Xlinker " , " @loader_path " ,
31653174 " @ \( buildPath. appending ( components: " lib.product " , " Objects.LinkFileList " ) ) " ,
31663175 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
3176+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
31673177 " -target " , defaultTargetTriple,
31683178 " -Xlinker " , " -add_ast_path " , " -Xlinker " ,
31693179 buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
@@ -7294,6 +7304,7 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
72947304 " -emit-executable " ,
72957305 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
72967306 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
7307+ " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-6.2/macosx " ,
72977308 " -target " , defaultTargetTriple,
72987309 " -Xlinker " , " -add_ast_path " ,
72997310 " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
0 commit comments