[clang] [clang][deps] Add module map describing compiled module to file dependencies. (PR #160226)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 17 20:04:23 PDT 2025
================
@@ -685,6 +685,13 @@ void ModuleDepCollectorPP::EndOfMainFile() {
if (!MDC.ScanInstance.getPreprocessorOpts().ImplicitPCHInclude.empty())
MDC.addFileDep(MDC.ScanInstance.getPreprocessorOpts().ImplicitPCHInclude);
+ if (Module *CurrentModule = PP.getCurrentModuleImplementation()) {
+ if (OptionalFileEntryRef CurrentModuleMap =
+ PP.getHeaderSearchInfo().getModuleMap().getModuleMapFileForUniquing(
+ CurrentModule))
+ MDC.addFileDep(CurrentModuleMap->getName());
----------------
jansvoboda11 wrote:
The build system uses file-deps to check their modification time during incremental builds and figure out what needs to be recompiled.
What do you mean by input and output paths? All file dependencies are inputs currently.
How do you plan to feed the list of files to the compiler?
https://github.com/llvm/llvm-project/pull/160226
More information about the cfe-commits
mailing list