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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to