Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ public extension Driver {
try commandLine.appendLast(.clangScannerModuleCachePath, from: &parsedOptions)
}

if isFrontendArgSupported(.scannerModuleValidation) {
commandLine.appendFlag(.scannerModuleValidation)
}

if isFrontendArgSupported(.scannerPrefixMap) {
// construct `-scanner-prefix-mapper` for scanner.
for (key, value) in prefixMapping {
Expand Down
4 changes: 4 additions & 0 deletions Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
scannerCommand.removeFirst()
}

if driver.isFrontendArgSupported(.scannerModuleValidation) {
XCTAssertTrue(scannerCommand.contains("-scanner-module-validation"))
}

// Ensure we do not propagate the usual PCH-handling arguments to the scanner invocation
XCTAssertFalse(scannerCommand.contains("-pch-output-dir"))
XCTAssertFalse(scannerCommand.contains("Foo.o"))
Expand Down