From: Joel Rosdahl Date: Sat, 22 Feb 2020 12:12:16 +0000 (+0100) Subject: Make failure to run compiler_check command a soft error X-Git-Tag: v4.0~606 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c15ada7c1178d4f69859e9dda6cf3ebd695dffe;p=thirdparty%2Fccache.git Make failure to run compiler_check command a soft error 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. --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 0cc3b555c..f0181032e 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -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(); } } } diff --git a/test/suites/base.bash b/test/suites/base.bash index f3dc8f262..6e0c1a928 100644 --- a/test/suites/base.bash +++ b/test/suites/base.bash @@ -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 # -------------------------------------------------------------------------