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 {
121121 }
122122
123123 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+ }
125127
126128 // Pass on the input files
127129 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 {
13651365 }
13661366 }
13671367
1368- /// Test that the scanner invocation does not rely in response files
1368+ /// Test that the scanner invocation does not rely on response files
13691369 func testDependencyScanningSeparateClangScanCache( ) throws {
13701370 try withTemporaryDirectory { path in
13711371 let scannerCachePath : AbsolutePath = path. appending ( component: " ClangScannerCache " )
@@ -1381,6 +1381,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
13811381 " -working-directory " , path. nativePathString ( escaped: true ) ,
13821382 main. nativePathString ( escaped: true ) ] + sdkArgumentsForTesting,
13831383 env: ProcessEnv . vars)
1384+ guard driver. isFrontendArgSupported ( . clangScannerModuleCachePath) else {
1385+ throw XCTSkip ( " Skipping: compiler does not support '-clang-scanner-module-cache-path' " )
1386+ }
1387+
13841388 let scannerJob = try driver. dependencyScanningJob ( )
13851389 XCTAssertTrue ( scannerJob. commandLine. contains ( subsequence: [ . flag( " -clang-scanner-module-cache-path " ) ,
13861390 . path( . absolute( scannerCachePath) ) ] ) )
You can’t perform that action at this time.
0 commit comments