From 2756e2ee0bceaf532d4990cbb4f2a84fe62b6b84 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 4 Oct 2020 01:07:20 -0400 Subject: [libTooling] Recognize sccache as a compiler wrapper in compilation database commands sccache is a compiler caching tool similar to ccache. Differential Revision: https://reviews.llvm.org/D88790 --- clang/lib/Tooling/JSONCompilationDatabase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp') diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp index 67a42d3..4aa1685 100644 --- a/clang/lib/Tooling/JSONCompilationDatabase.cpp +++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp @@ -272,7 +272,8 @@ static bool unwrapCommand(std::vector &Args) { 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`. -- cgit v1.1