[PATCH] D64297: [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 06:44:25 PDT 2019


sammccall marked 3 inline comments as done.
sammccall added inline comments.


================
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.
----------------
MaskRay wrote:
> Is this possible?
> 
> ```
> % ccache a.c
> ccache: error: Could not find compiler "a.c" in PATH
> ```
Oops - it's possible for distcc and gomacc, but ccache doesn't support it.

I updated the comment, though I don't think it's worth branching the behavior. Worst case is that we have some false negatives where ccache doesn't get unwrapped, but I think they won't happen in practice (otherwise distcc and gomacc would have FAQ/workarounds for these).


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