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
12 lines
142 B
Plaintext
12 lines
142 B
Plaintext
module ModCommon {
|
|
header "mod_common.h"
|
|
|
|
module ModCommonSub {
|
|
header "mod_common_sub.h"
|
|
}
|
|
}
|
|
|
|
module ModTU {
|
|
header "mod_tu.h"
|
|
}
|