When compiling a module, its semantics and Clang's behavior are affected by other modules. These modules are typically the imported ones. However, during implicit build, some modules end up being compiled and read without being actually imported. This patch starts tracking such modules and serializing them into .pcm files. This enables the dependency scanner to construct explicit compilations that mimic implicit build.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp | ||
---|---|---|
284 | If using eager loading, this will cause us to load the module, right? Does that behaviour match the implicit build? | |
clang/test/ClangScanDeps/modules-incomplete-umbrella.c | ||
83 | The test should probably cover the imports in the command-lines. |
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp | ||
---|---|---|
284 | That's correct. The implicit build does the same. | |
clang/test/ClangScanDeps/modules-incomplete-umbrella.c | ||
83 | Most -fmodule-file= checks were removed in D132066, since these are likely to change in the future, and I'm okay with relying on "clang-module-deps". I can see the argument that in this particular case the dependencies are not ordinary imports, but somewhat of an edge case, so I'm fine with adding the checks. |
clang/test/ClangScanDeps/modules-incomplete-umbrella.c | ||
---|---|---|
83 | I'd prefer to add the checks in this specific case. I agree it's not relevant to most other tests. |
If using eager loading, this will cause us to load the module, right? Does that behaviour match the implicit build?