Skip to content

Commit df16fca

Browse files
committed
Fix explicit modules incremental build failure when only the clang module of a mixed-source module requires rebuild
After reading a prior intermodule dependency graph in an incremental explicit module build, the driver loops over each module in the graph to check if it is up to date. The check which is intended to skip the main (Swift) module was including a clang module with the same name as well, if it existed. If this clang module was the only one to be updated in an incremental compile, we wouldn't regenerate its pcm, and compilation would later fail since it wasn't up to date. rdar://121352768
1 parent 8f88ff2 commit df16fca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftDriver/IncrementalCompilation/IncrementalDependencyAndInputSetup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ extension IncrementalCompilationState.IncrementalDependencyAndInputSetup {
211211
buildRecordInfo: BuildRecordInfo,
212212
reporter: IncrementalCompilationState.Reporter?) throws -> Bool {
213213
for module in graph.modules {
214-
if module.key.moduleName == graph.mainModuleName {
214+
if module.key == .swift(graph.mainModuleName) {
215215
continue
216216
}
217217
if try !verifyModuleDependencyUpToDate(moduleID: module.key,

0 commit comments

Comments
 (0)