@@ -83,7 +83,7 @@ extension Driver {
83
83
switch kind {
84
84
case . generatePCH:
85
85
try addExplicitPCHBuildArguments ( inputs: & inputs, commandLine: & commandLine)
86
- case . compile, . emitModule, . interpret:
86
+ case . compile, . emitModule, . interpret, . verifyModuleInterface :
87
87
try addExplicitModuleBuildArguments ( inputs: & inputs, commandLine: & commandLine)
88
88
default :
89
89
break
@@ -671,6 +671,23 @@ extension Driver {
671
671
try dependencyPlanner. resolveBridgingHeaderDependencies ( inputs: & inputs, commandLine: & commandLine)
672
672
}
673
673
674
+ /// Compute the cache key for swift interface outputs.
675
+ mutating func computeCacheKeyForInterface( mainInput: TypedVirtualPath ,
676
+ outputs: [ TypedVirtualPath ] ,
677
+ commandLine: [ Job . ArgTemplate ] ) throws {
678
+ if enableCaching {
679
+ func computeKeyForInterface( forPrivate: Bool ) throws -> String ? {
680
+ let outputType : FileType =
681
+ forPrivate ? . privateSwiftInterface : . swiftInterface
682
+ let isNeeded = outputs. contains { $0. type == outputType }
683
+ guard isNeeded else { return nil }
684
+ return try interModuleDependencyOracle. computeCacheKeyForOutput ( kind: outputType, commandLine: commandLine, input: mainInput. fileHandle)
685
+ }
686
+ swiftInterfaceCacheKey = try computeKeyForInterface ( forPrivate: false )
687
+ privateSwiftInterfaceCacheKey = try computeKeyForInterface ( forPrivate: true )
688
+ }
689
+ }
690
+
674
691
/// In Explicit Module Build mode, distinguish between main module jobs and intermediate dependency build jobs,
675
692
/// such as Swift modules built from .swiftmodule files and Clang PCMs.
676
693
public func isExplicitMainModuleJob( job: Job ) -> Bool {
0 commit comments