[PATCH] D88790: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands

2020-10-26 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2756e2ee0bce: [libTooling] Recognize sccache as a compiler 
wrapper in compilation database… (authored by nridge).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88790/new/

https://reviews.llvm.org/D88790

Files:
  clang/lib/Tooling/JSONCompilationDatabase.cpp
  clang/unittests/Tooling/CompilationDatabaseTest.cpp


Index: clang/unittests/Tooling/CompilationDatabaseTest.cpp
===
--- clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -383,6 +383,7 @@
   std::vector> Cases = {
   {"distcc gcc foo.c", "gcc foo.c"},
   {"gomacc clang++ foo.c", "clang++ foo.c"},
+  {"sccache clang++ foo.c", "clang++ foo.c"},
   {"ccache gcc foo.c", "gcc foo.c"},
   {"ccache.exe gcc foo.c", "gcc foo.c"},
   {"ccache g++.exe foo.c", "g++.exe foo.c"},
Index: clang/lib/Tooling/JSONCompilationDatabase.cpp
===
--- clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -272,7 +272,8 @@
 return false;
   StringRef Wrapper =
   stripExecutableExtension(llvm::sys::path::filename(Args.front()));
-  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache") {
+  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache" ||
+  Wrapper == "sccache") {
 // Most of these wrappers support being invoked 3 ways:
 // `distcc g++ file.c` This is the mode we're trying to match.
 // We need to drop `distcc`.


Index: clang/unittests/Tooling/CompilationDatabaseTest.cpp
===
--- clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -383,6 +383,7 @@
   std::vector> Cases = {
   {"distcc gcc foo.c", "gcc foo.c"},
   {"gomacc clang++ foo.c", "clang++ foo.c"},
+  {"sccache clang++ foo.c", "clang++ foo.c"},
   {"ccache gcc foo.c", "gcc foo.c"},
   {"ccache.exe gcc foo.c", "gcc foo.c"},
   {"ccache g++.exe foo.c", "g++.exe foo.c"},
Index: clang/lib/Tooling/JSONCompilationDatabase.cpp
===
--- clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -272,7 +272,8 @@
 return false;
   StringRef Wrapper =
   stripExecutableExtension(llvm::sys::path::filename(Args.front()));
-  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache") {
+  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache" ||
+  Wrapper == "sccache") {
 // Most of these wrappers support being invoked 3 ways:
 // `distcc g++ file.c` This is the mode we're trying to match.
 // We need to drop `distcc`.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D88790: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands

2020-10-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks! Sorry about missing this...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88790/new/

https://reviews.llvm.org/D88790

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D88790: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands

2020-10-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment.

Review ping :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88790/new/

https://reviews.llvm.org/D88790

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D88790: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands

2020-10-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment.

Link to sccache for those not familiar: https://github.com/mozilla/sccache/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88790/new/

https://reviews.llvm.org/D88790

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D88790: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands

2020-10-03 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
nridge requested review of this revision.

sccache is a compiler caching tool similar to ccache.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88790

Files:
  clang/lib/Tooling/JSONCompilationDatabase.cpp
  clang/unittests/Tooling/CompilationDatabaseTest.cpp


Index: clang/unittests/Tooling/CompilationDatabaseTest.cpp
===
--- clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -383,6 +383,7 @@
   std::vector> Cases = {
   {"distcc gcc foo.c", "gcc foo.c"},
   {"gomacc clang++ foo.c", "clang++ foo.c"},
+  {"sccache clang++ foo.c", "clang++ foo.c"},
   {"ccache gcc foo.c", "gcc foo.c"},
   {"ccache.exe gcc foo.c", "gcc foo.c"},
   {"ccache g++.exe foo.c", "g++.exe foo.c"},
Index: clang/lib/Tooling/JSONCompilationDatabase.cpp
===
--- clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -272,7 +272,8 @@
 return false;
   StringRef Wrapper =
   stripExecutableExtension(llvm::sys::path::filename(Args.front()));
-  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache") {
+  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache" ||
+  Wrapper == "sccache") {
 // Most of these wrappers support being invoked 3 ways:
 // `distcc g++ file.c` This is the mode we're trying to match.
 // We need to drop `distcc`.


Index: clang/unittests/Tooling/CompilationDatabaseTest.cpp
===
--- clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -383,6 +383,7 @@
   std::vector> Cases = {
   {"distcc gcc foo.c", "gcc foo.c"},
   {"gomacc clang++ foo.c", "clang++ foo.c"},
+  {"sccache clang++ foo.c", "clang++ foo.c"},
   {"ccache gcc foo.c", "gcc foo.c"},
   {"ccache.exe gcc foo.c", "gcc foo.c"},
   {"ccache g++.exe foo.c", "g++.exe foo.c"},
Index: clang/lib/Tooling/JSONCompilationDatabase.cpp
===
--- clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -272,7 +272,8 @@
 return false;
   StringRef Wrapper =
   stripExecutableExtension(llvm::sys::path::filename(Args.front()));
-  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache") {
+  if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache" ||
+  Wrapper == "sccache") {
 // Most of these wrappers support being invoked 3 ways:
 // `distcc g++ file.c` This is the mode we're trying to match.
 // We need to drop `distcc`.
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits