[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 10 09:56:24 PDT 2025
jansvoboda11 wrote:
I don't know what the desired properties of this feature are exactly, 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. Even with those optimizations on, I'm not convinced we have great guarantees regarding the sysroot-only nature of the command line. I would like to see stronger guarantee.
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. We could use it to check the prefixes of all paths exhaustively (in addition to the logic you already implemented).
https://github.com/llvm/llvm-project/pull/130634
More information about the cfe-commits
mailing list