]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make failure to run compiler_check command a soft error
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 22 Feb 2020 12:12:16 +0000 (13:12 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 22 Feb 2020 20:53:27 +0000 (21:53 +0100)
No need to make a failure when running the compiler check fatal since
other misconfigured settings can have a similar effect without resulting
in fatal errors.

src/ccache.cpp
test/suites/base.bash

index 0cc3b555c2f9777e1195583a3df1045c8a01c2e2..f0181032e86790e7cfc75baab78f5680a60dcbd3 100644 (file)
@@ -1499,8 +1499,9 @@ hash_compiler(Context& ctx,
     bool ok = hash_multicommand_output(
       ctx, hash, ctx.config.compiler_check().c_str(), ctx.orig_args->argv[0]);
     if (!ok) {
-      fatal("Failure running compiler check command: %s",
-            ctx.config.compiler_check().c_str());
+      cc_log("Failure running compiler check command: %s",
+             ctx.config.compiler_check().c_str());
+      failed();
     }
   }
 }
index f3dc8f262dfe3d4b9caaba92cb4b6612f8df151d..6e0c1a9282aadb70ca879a5a54fe14aa9ccc55f8 100644 (file)
@@ -857,9 +857,6 @@ EOF
     chmod +x compiler.sh
 
     CCACHE_COMPILERCHECK="unknown_command" $CCACHE ./compiler.sh -c test1.c 2>/dev/null
-    if [ "$?" -eq 0 ]; then
-        test_failed "Expected failure running unknown_command to verify compiler but was success"
-    fi
     expect_stat 'compiler check failed' 1
 
     # -------------------------------------------------------------------------