File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Sources/SwiftDriver/ExplicitModuleBuilds Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ public extension Driver {
121
121
}
122
122
123
123
try commandLine. appendLast ( . clangIncludeTree, from: & parsedOptions)
124
- try commandLine. appendLast ( . clangScannerModuleCachePath, from: & parsedOptions)
124
+ if isFrontendArgSupported ( . clangScannerModuleCachePath) {
125
+ try commandLine. appendLast ( . clangScannerModuleCachePath, from: & parsedOptions)
126
+ }
125
127
126
128
// Pass on the input files
127
129
commandLine. append ( contentsOf: inputFiles. filter { $0. type == . swift } . map { . path( $0. file) } )
Original file line number Diff line number Diff line change @@ -1365,7 +1365,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
1365
1365
}
1366
1366
}
1367
1367
1368
- /// Test that the scanner invocation does not rely in response files
1368
+ /// Test that the scanner invocation does not rely on response files
1369
1369
func testDependencyScanningSeparateClangScanCache( ) throws {
1370
1370
try withTemporaryDirectory { path in
1371
1371
let scannerCachePath : AbsolutePath = path. appending ( component: " ClangScannerCache " )
@@ -1381,6 +1381,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
1381
1381
" -working-directory " , path. nativePathString ( escaped: true ) ,
1382
1382
main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting,
1383
1383
env: ProcessEnv . vars)
1384
+ guard driver. isFrontendArgSupported ( . clangScannerModuleCachePath) else {
1385
+ throw XCTSkip ( " Skipping: compiler does not support '-clang-scanner-module-cache-path' " )
1386
+ }
1387
+
1384
1388
let scannerJob = try driver. dependencyScanningJob ( )
1385
1389
XCTAssertTrue ( scannerJob. commandLine. contains ( subsequence: [ . flag( " -clang-scanner-module-cache-path " ) ,
1386
1390
. path( . absolute( scannerCachePath) ) ] ) )
You can’t perform that action at this time.
0 commit comments