@@ -648,7 +648,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
648
648
}
649
649
650
650
func testModuleAliasingWithImportPrescan( ) throws {
651
- let ( _, _, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
651
+ let ( _, _, toolchain, _ ) = try getDriverArtifactsForScanning ( )
652
652
653
653
let dummyDriver = try Driver ( args: [ " swiftc " , " -module-name " , " dummyDriverCheck " , " test.swift " ] )
654
654
guard dummyDriver. isFrontendArgSupported ( . moduleAlias) else {
@@ -658,9 +658,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
658
658
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
659
659
// queries.
660
660
let dependencyOracle = InterModuleDependencyOracle ( )
661
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
662
- hostTriple: hostTriple,
663
- env: ProcessEnv . vars)
661
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
664
662
guard try dependencyOracle
665
663
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
666
664
swiftScanLibPath: scanLibPath) else {
@@ -840,9 +838,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
840
838
841
839
// 2. Run a dependency scan to find the just-built module
842
840
let dependencyOracle = InterModuleDependencyOracle ( )
843
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
844
- hostTriple: hostTriple,
845
- env: ProcessEnv . vars)
841
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
846
842
guard try dependencyOracle
847
843
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
848
844
swiftScanLibPath: scanLibPath) else {
@@ -939,14 +935,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
939
935
940
936
/// Test the libSwiftScan dependency scanning (import-prescan).
941
937
func testDependencyImportPrescan( ) throws {
942
- let ( stdLibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
938
+ let ( stdLibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
943
939
944
940
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
945
941
// queries.
946
942
let dependencyOracle = InterModuleDependencyOracle ( )
947
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
948
- hostTriple: hostTriple,
949
- env: ProcessEnv . vars)
943
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
950
944
guard try dependencyOracle
951
945
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
952
946
swiftScanLibPath: scanLibPath) else {
@@ -1020,14 +1014,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
1020
1014
}
1021
1015
1022
1016
func testDependencyScanningFailure( ) throws {
1023
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1017
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1024
1018
1025
1019
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
1026
1020
// queries.
1027
1021
let dependencyOracle = InterModuleDependencyOracle ( )
1028
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1029
- hostTriple: hostTriple,
1030
- env: ProcessEnv . vars)
1022
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1031
1023
guard try dependencyOracle
1032
1024
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1033
1025
swiftScanLibPath: scanLibPath) else {
@@ -1098,9 +1090,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1098
1090
// The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
1099
1091
// queries.
1100
1092
let dependencyOracle = InterModuleDependencyOracle ( )
1101
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1102
- hostTriple: hostTriple,
1103
- env: ProcessEnv . vars)
1093
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1104
1094
guard try dependencyOracle
1105
1095
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1106
1096
swiftScanLibPath: scanLibPath) else {
@@ -1293,11 +1283,9 @@ final class ExplicitModuleBuildTests: XCTestCase {
1293
1283
}
1294
1284
1295
1285
func testDependencyGraphDotSerialization( ) throws {
1296
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1286
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1297
1287
let dependencyOracle = InterModuleDependencyOracle ( )
1298
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1299
- hostTriple: hostTriple,
1300
- env: ProcessEnv . vars)
1288
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1301
1289
guard try dependencyOracle
1302
1290
. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1303
1291
swiftScanLibPath: scanLibPath) else {
@@ -1358,7 +1346,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1358
1346
1359
1347
/// Test the libSwiftScan dependency scanning.
1360
1348
func testDependencyScanReuseCache( ) throws {
1361
- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1349
+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
1362
1350
try withTemporaryDirectory { path in
1363
1351
let cacheSavePath = path. appending ( component: " saved.moddepcache " )
1364
1352
let main = path. appending ( component: " testDependencyScanning.swift " )
@@ -1394,9 +1382,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1394
1382
scannerCommand. removeFirst ( )
1395
1383
}
1396
1384
1397
- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1398
- hostTriple: hostTriple,
1399
- env: ProcessEnv . vars)
1385
+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
1400
1386
// Run the first scan and serialize the cache contents.
1401
1387
let firstDependencyOracle = InterModuleDependencyOracle ( )
1402
1388
guard try firstDependencyOracle
0 commit comments