]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add support for clang's --config option (#850)
authorTom Stellard <tstellar@redhat.com>
Sun, 23 May 2021 12:28:15 +0000 (08:28 -0400)
committerGitHub <noreply@github.com>
Sun, 23 May 2021 12:28:15 +0000 (14:28 +0200)
This is more or less equivalent to gcc's --specs option except that the
contents of the file have different syntaxes.

src/ccache.cpp
src/compopt.cpp

index 761b9ab437a2f75e39132428ad1bec81663946bd..610c125b56517716315a32877a2976ad023eaaa9 100644 (file)
@@ -1657,7 +1657,8 @@ calculate_result_name(Context& ctx,
 
     if (Util::starts_with(args[i], "-specs=")
         || Util::starts_with(args[i], "--specs=")
-        || (args[i] == "-specs" || args[i] == "--specs")) {
+        || (args[i] == "-specs" || args[i] == "--specs")
+        || args[i] == "--config") {
       std::string path;
       size_t eq_pos = args[i].find('=');
       if (eq_pos == std::string::npos) {
index 3ed4f5b5b8acb0ec44558407834cd1b79af3bc41..5e5f143f26600ea08be4aa3ef1656eee48318f79 100644 (file)
@@ -55,6 +55,7 @@ const CompOpt compopts[] = {
   {"--Werror", TAKES_ARG},                            // nvcc
   {"--analyze", TOO_HARD},                            // Clang
   {"--compiler-bindir", AFFECTS_CPP | TAKES_ARG},     // nvcc
+  {"--config", TAKES_ARG},                            // Clang
   {"--libdevice-directory", AFFECTS_CPP | TAKES_ARG}, // nvcc
   {"--output-directory", AFFECTS_CPP | TAKES_ARG},    // nvcc
   {"--param", TAKES_ARG},