]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
feat: Add knowledge about --offload-compress (#1571)
authorIcarus Sparry (work) <98788394+amd-isparry@users.noreply.github.com>
Thu, 27 Feb 2025 19:30:51 +0000 (11:30 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 19:30:51 +0000 (20:30 +0100)
Clang has a feature where it can compress compiler products such as object files, and this includes when it is just called to preprocess the input file.

Ccache expects to be able to process the output of the preprocessor, and is not expecting a compressed binary file.

The fix is to remove this "--offload-compress" option using the existing facilities when preprocessing.

src/ccache/compopt.cpp

index 75f1bbcf04ea831549cba21973e88fdc4b11d921..49d0bff95d52575cfe4c79669ade0e184cbd187a 100644 (file)
@@ -59,6 +59,7 @@ const CompOpt compopts[] = {
   {"--gcc-toolchain=", TAKES_CONCAT_ARG | TAKES_PATH}, // Clang
   {"--include", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG | TAKES_PATH},
   {"--libdevice-directory", AFFECTS_CPP | TAKES_ARG}, // nvcc
+  {"--offload-compress", AFFECTS_COMP},               // Clang
   {"--output-directory", AFFECTS_CPP | TAKES_ARG},    // nvcc
   {"--param", TAKES_ARG},
   {"--save-temps", TOO_HARD},