From: Joel Rosdahl Date: Tue, 6 Jun 2023 19:42:12 +0000 (+0200) Subject: fix: Don't pass -v to the preprocessor X-Git-Tag: v4.8.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d84d5334ee381fdd0996d3e425d254637f06aa45;p=thirdparty%2Fccache.git fix: Don't pass -v to the preprocessor The -v option tells the compiler to print various diagnostics to stdout, including randomly generated filenames. When ccache calls the preprocessor and -v is on the command line, the random information will become part of the input hash, making the preprocessor mode always produce cache misses. Fix this by only passing -v when compiling, not preprocessing. Closes #1293. --- diff --git a/src/compopt.cpp b/src/compopt.cpp index a7ec8b22c..f381c75e0 100644 --- a/src/compopt.cpp +++ b/src/compopt.cpp @@ -151,6 +151,7 @@ const CompOpt compopts[] = { {"-stdlib=", AFFECTS_CPP | TAKES_CONCAT_ARG}, {"-trigraphs", AFFECTS_CPP}, {"-u", TAKES_ARG | TAKES_CONCAT_ARG}, + {"-v", AFFECTS_COMP}, {"-z", TAKES_ARG | TAKES_CONCAT_ARG | AFFECTS_COMP}, };