@@ -7390,14 +7390,10 @@ final class SwiftDriverTests: XCTestCase {
73907390
73917391 func testRelativeResourceDir( ) throws {
73927392 do {
7393- // Reset the environment to avoid 'SDKROOT' influencing the
7394- // linux driver paths and taking the priority over the resource directory.
7395- var env = ProcessEnv . vars
7396- env [ " SDKROOT " ] = nil
73977393 var driver = try Driver ( args: [ " swiftc " ,
73987394 " -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
73997395 " foo.swift " ,
7400- " -resource-dir " , " resource/dir " ] , env : env )
7396+ " -resource-dir " , " resource/dir " ] )
74017397 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
74027398
74037399 let compileJob = plannedJobs [ 0 ]
@@ -7412,7 +7408,7 @@ final class SwiftDriverTests: XCTestCase {
74127408 }
74137409 }
74147410
7415- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7411+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
74167412 do {
74177413 let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
74187414 var env = ProcessEnv . vars
@@ -7426,7 +7422,7 @@ final class SwiftDriverTests: XCTestCase {
74267422 XCTAssertEqual ( compileJob. kind, . compile)
74277423 let linkJob = plannedJobs [ 1 ]
74287424 XCTAssertEqual ( linkJob. kind, . link)
7429- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7425+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
74307426 }
74317427 }
74327428
0 commit comments