@@ -640,7 +640,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
640
640
}
641
641
642
642
func testModuleAliasingWithImportPrescan( ) throws {
643
- let ( _, _, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
643
+ let ( _, _, toolchain, _ ) = try getDriverArtifactsForScanning ( )
644
644
645
645
let dummyDriver = try Driver ( args: [ " swiftc " , " -module-name " , " dummyDriverCheck " , " test.swift " ] )
646
646
guard dummyDriver. isFrontendArgSupported ( . moduleAlias) else {
@@ -650,9 +650,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
650
650
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
651
651
// queries.
652
652
let dependencyOracle = InterModuleDependencyOracle ( )
653
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
654
- hostTriple: hostTriple,
655
- env: ProcessEnv . vars)
653
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
656
654
guard try dependencyOracle
657
655
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
658
656
swiftScanLibPath: scanLibPath) else {
@@ -832,9 +830,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
832
830
833
831
// 2. Run a dependency scan to find the just-built module
834
832
let dependencyOracle = InterModuleDependencyOracle ( )
835
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
836
- hostTriple: hostTriple,
837
- env: ProcessEnv . vars)
833
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
838
834
guard try dependencyOracle
839
835
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
840
836
swiftScanLibPath: scanLibPath) else {
@@ -931,14 +927,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
931
927
932
928
/// Test the libSwiftScan dependency scanning (import-prescan).
933
929
func testDependencyImportPrescan( ) throws {
934
- let ( stdLibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
930
+ let ( stdLibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
935
931
936
932
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
937
933
// queries.
938
934
let dependencyOracle = InterModuleDependencyOracle ( )
939
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
940
- hostTriple: hostTriple,
941
- env: ProcessEnv . vars)
935
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
942
936
guard try dependencyOracle
943
937
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
944
938
swiftScanLibPath: scanLibPath) else {
@@ -1009,14 +1003,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
1009
1003
}
1010
1004
1011
1005
func testDependencyScanningFailure( ) throws {
1012
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1006
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1013
1007
1014
1008
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
1015
1009
// queries.
1016
1010
let dependencyOracle = InterModuleDependencyOracle ( )
1017
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1018
- hostTriple: hostTriple,
1019
- env: ProcessEnv . vars)
1011
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1020
1012
guard try dependencyOracle
1021
1013
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1022
1014
swiftScanLibPath: scanLibPath) else {
@@ -1087,9 +1079,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1087
1079
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
1088
1080
// queries.
1089
1081
let dependencyOracle = InterModuleDependencyOracle ( )
1090
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1091
- hostTriple: hostTriple,
1092
- env: ProcessEnv . vars)
1082
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1093
1083
guard try dependencyOracle
1094
1084
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1095
1085
swiftScanLibPath: scanLibPath) else {
@@ -1277,11 +1267,9 @@ final class ExplicitModuleBuildTests: XCTestCase {
1277
1267
}
1278
1268
1279
1269
func testDependencyGraphDotSerialization( ) throws {
1280
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1270
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1281
1271
let dependencyOracle = InterModuleDependencyOracle ( )
1282
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1283
- hostTriple: hostTriple,
1284
- env: ProcessEnv . vars)
1272
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1285
1273
guard try dependencyOracle
1286
1274
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1287
1275
swiftScanLibPath: scanLibPath) else {
@@ -1342,7 +1330,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1342
1330
1343
1331
/// Test the libSwiftScan dependency scanning.
1344
1332
func testDependencyScanReuseCache( ) throws {
1345
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1333
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1346
1334
try withTemporaryDirectory { path in
1347
1335
let cacheSavePath = path. appending ( component: " saved.moddepcache " )
1348
1336
let main = path. appending ( component: " testDependencyScanning.swift " )
@@ -1378,9 +1366,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1378
1366
scannerCommand. removeFirst ( )
1379
1367
}
1380
1368
1381
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1382
- hostTriple: hostTriple,
1383
- env: ProcessEnv . vars)
1369
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1384
1370
// Run the first scan and serialize the cache contents.
1385
1371
let firstDependencyOracle = InterModuleDependencyOracle ( )
1386
1372
guard try firstDependencyOracle
0 commit comments