Skip to content

Commit c362e92

Browse files
committed
[ClangImporter] Hash content for validation when using clang modules
Set it up as part of configuring the modules build. Should help diminish the amount of clang modules rebuilds due to mtime invalidation. rdar://problem/57309954
1 parent 0fc9bae commit c362e92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@ ClangImporter::create(ASTContext &ctx, const ClangImporterOptions &importerOpts,
10711071
// read them later.
10721072
instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true;
10731073

1074+
// Make sure to not trigger extra rebuilds on identical files with mismatching
1075+
// timestamps.
1076+
instance.getHeaderSearchOpts().ValidateASTInputFilesContent = true;
1077+
10741078
if (importerOpts.Mode == ClangImporterOptions::Modes::PrecompiledModule)
10751079
return importer;
10761080

0 commit comments

Comments
 (0)