From d84d5334ee381fdd0996d3e425d254637f06aa45 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 6 Jun 2023 21:42:12 +0200 Subject: [PATCH] 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. --- src/compopt.cpp | 1 + 1 file changed, 1 insertion(+) 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}, }; -- 2.47.2