[PATCH] D64297: [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 20:26:36 PDT 2019
MaskRay added inline comments.
================
Comment at: clang/lib/Tooling/JSONCompilationDatabase.cpp:292
+ Arguments.push_back(Node->getValue(Storage));
+ while (unwrapCommand(Arguments))
+ ;
----------------
sammccall wrote:
> MaskRay wrote:
> > This loop may be too much. One-shot unwrapCommand(Arguments) may just work
> Using `ccache` and `distcc` together is a common pattern.
>
> (Is there a specific problem? Obviously it is possible to leave this out, but I can't see how it could cause problems that wouldn't occur with a single wrapper)
Probably fine if `Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache"` is used above.
================
Comment at: clang/lib/Tooling/JSONCompilationDatabase.cpp:277
+ // We need to drop `ccache`.
+ // `ccache file.c` This acts like compiler is cc or similar.
+ // Clang's driver can handle this, no change needed.
----------------
Is this possible?
```
% ccache a.c
ccache: error: Could not find compiler "a.c" in PATH
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64297/new/
https://reviews.llvm.org/D64297
More information about the llvm-commits
mailing list