multiplier icon indicating copy to clipboard operation
multiplier copied to clipboard

Add a best-effort indexing mode

Open pgoodman opened this issue 2 years ago • 1 comments

The idea here is that when indexing GCC builds, we should have a way to try to succeed even when we can't. For example, we should try to interpret the commands "as if" they were Clang commands.

This could take the form of passing in --resource_dir, etc. to the indexer. Or maybe in the form of applying QA overrides, the way clang does it with ApplyQAOverride in its driver. For example, the following QA override would "do the trick":

CCC_OVERRIDE_OPTIONS="s/-resource-dir/-isystem/ ^/usr/lib/llvm-15/lib/clang/15.0.7 ^-resource-dir"

But this environment variable doesn't affect PASTA.

pgoodman avatar Nov 15 '23 22:11 pgoodman

I have a new hack that kind of works:

LIBRARY_PATH=<resource-dir>
CPATH="-resource-dir <resource-dir>:<include-dir1>:...:<include-dirN>"
CPPFLAGS="-nostdinc -nobuiltininc"

pgoodman avatar Nov 16 '23 00:11 pgoodman