[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)
Cyndy Ishida via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 10 10:12:18 PDT 2025
cyndyishida wrote:
> but I'm concerned that this does not guarantee the resulting command line only refers to inputs in the sysroot. Imagine that we run this without the header search and VFS pruning optimizations - the command line will likely refer to unused project-specific source/build directories.
I would think that if `ModuleDepCollector` only found dependency inputs that resolve to sysroot locations, the command line for building the specific module wouldn't matter. Of course, I would also expect that `Precompile module` invocations don't point to paths they don't need, but wouldn't be required for tracking whether a module is in sysroot. Is there a concern that the command lines (e.g. header search paths with different files populated) between scanning and compiling could result in different input files being resolved?
> One way of doing this is going through the *Options classes that contribute to CompilerInvocation and adding an API that allows for iteration through all input/output paths.
Do you have an intuition of whether this would be noticeably expensive for the scanner?
https://github.com/llvm/llvm-project/pull/130634
More information about the cfe-commits
mailing list