@@ -7621,14 +7621,10 @@ final class SwiftDriverTests: XCTestCase {
76217621
76227622 func testRelativeResourceDir( ) throws {
76237623 do {
7624- // Reset the environment to avoid 'SDKROOT' influencing the
7625- // linux driver paths and taking the priority over the resource directory.
7626- var env = ProcessEnv . block
7627- env [ " SDKROOT " ] = nil
76287624 var driver = try Driver ( args: [ " swiftc " ,
76297625 " -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
76307626 " foo.swift " ,
7631- " -resource-dir " , " resource/dir " ] , env : env )
7627+ " -resource-dir " , " resource/dir " ] )
76327628 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
76337629
76347630 let compileJob = plannedJobs [ 0 ]
@@ -7643,7 +7639,7 @@ final class SwiftDriverTests: XCTestCase {
76437639 }
76447640 }
76457641
7646- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7642+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
76477643 do {
76487644 let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
76497645 var env = ProcessEnv . block
@@ -7657,7 +7653,7 @@ final class SwiftDriverTests: XCTestCase {
76577653 XCTAssertEqual ( compileJob. kind, . compile)
76587654 let linkJob = plannedJobs [ 1 ]
76597655 XCTAssertEqual ( linkJob. kind, . link)
7660- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7656+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
76617657 }
76627658 }
76637659
0 commit comments