The `ASTReader` populates `Module::PresumedModuleMapFile` only for top-level modules, not submodules. To avoid generating empty `-fmodule-map-file=` arguments, make discovered modules depend on top-level precompiled modules. The granularity of submodules is not important here. The documentation of `Module::PresumedModuleMapFile` says this field is non-empty only when building from preprocessed source. This means there can still be cases where the dependency scanner generates empty `-fmodule-map-file=` arguments. That's being addressed in separate patch: D108544. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D108647
8 lines
197 B
JSON
8 lines
197 B
JSON
[
|
|
{
|
|
"directory": "DIR",
|
|
"command": "clang -x c-header DIR/pch.h -fmodules -gmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -o DIR/pch.h.gch",
|
|
"file": "DIR/pch.h"
|
|
}
|
|
]
|