@@ -50,14 +50,19 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
5050 /// We avoid re-running the hash computation with the use of this cache
5151 private var hashedModuleNameCache : [ String : String ] = [ : ]
5252
53+ /// Does this compile support `.explicitInterfaceModuleBuild`
54+ private var supportsExplicitInterfaceBuild : Bool
55+
5356 public init ( dependencyGraph: InterModuleDependencyGraph ,
5457 toolchain: Toolchain ,
55- integratedDriver: Bool = true ) throws {
58+ integratedDriver: Bool = true ,
59+ supportsExplicitInterfaceBuild: Bool = false ) throws {
5660 self . dependencyGraph = dependencyGraph
5761 self . toolchain = toolchain
5862 self . integratedDriver = integratedDriver
5963 self . mainModuleName = dependencyGraph. mainModuleName
6064 self . reachabilityMap = try dependencyGraph. computeTransitiveClosure ( )
65+ self . supportsExplicitInterfaceBuild = supportsExplicitInterfaceBuild
6166 }
6267
6368 /// Generate build jobs for all dependencies of the main module.
@@ -165,6 +170,12 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
165170 }
166171 }
167172
173+ if supportsExplicitInterfaceBuild {
174+ // Ensure the compiler flags specified in the interface are ignored
175+ // because they are already captured in the dependency scanner output
176+ commandLine. appendFlag ( . explicitInterfaceModuleBuild)
177+ }
178+
168179 // Set the output path
169180 commandLine. appendFlag ( . o)
170181 commandLine. appendPath ( VirtualPath . lookup ( moduleInfo. modulePath. path) )
0 commit comments