Navigation Menu

Skip to content

Commit

Permalink
Add the module interface input to the command line of a verification job
Browse files Browse the repository at this point in the history
  • Loading branch information
owenv committed Oct 17, 2020
1 parent d4b91be commit f9229d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/SwiftDriver/Jobs/VerifyModuleInterfaceJob.swift
Expand Up @@ -13,8 +13,9 @@
extension Driver {
mutating func verifyModuleInterfaceJob(interfaceInput: TypedVirtualPath) throws -> Job {
var commandLine: [Job.ArgTemplate] = swiftCompilerPrefixArgs.map { Job.ArgTemplate.flag($0) }
var inputs: [TypedVirtualPath] = []
var inputs: [TypedVirtualPath] = [interfaceInput]
commandLine.appendFlags("-frontend", "-typecheck-module-from-interface")
commandLine.appendPath(interfaceInput.file)
try addCommonFrontendOptions(commandLine: &commandLine, inputs: &inputs)
// FIXME: MSVC runtime flags

Expand All @@ -32,8 +33,8 @@ extension Driver {
kind: .verifyModuleInterface,
tool: .absolute(try toolchain.getToolPath(.swiftCompiler)),
commandLine: commandLine,
displayInputs: [],
inputs: [interfaceInput],
displayInputs: [interfaceInput],
inputs: inputs,
primaryInputs: [],
outputs: [outputFile]
)
Expand Down
1 change: 1 addition & 0 deletions Tests/SwiftDriverTests/SwiftDriverTests.swift
Expand Up @@ -2643,6 +2643,7 @@ final class SwiftDriverTests: XCTestCase {
XCTAssertEqual(verifyJob.kind, .verifyModuleInterface)
XCTAssertTrue(verifyJob.inputs.count == 1)
XCTAssertTrue(verifyJob.inputs[0] == mergeInterfaceOutputs[0])
XCTAssertTrue(verifyJob.commandLine.contains(.path(mergeInterfaceOutputs[0].file)))
}
// No Evolution
do {
Expand Down

0 comments on commit f9229d2

Please sign in to comment.