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.
{"--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},