Example:
alex@pc:~/prj/sccache$ gcc -c test.S -o test.o -MD -MF test.d
alex@pc:~/prj/sccache$ clang-20 -c test.S -o test.o -MD -MF test.d
alex@pc:~/prj/sccache$ clang-20 -c test.s -o test.o -MD -MF test.d
clang-20: warning: argument unused during compilation: '-MD' [-Wunused-command-line-argument]
clang-20: warning: argument unused during compilation: '-MF test.d' [-Wunused-command-line-argument]
alex@pc:~/prj/sccache$ gcc -c test.s -o test.o -MD -MF test.d
In the first 2 calls (gcc & clang-20) file test.d is generated, while in the second one it isn't.
The sccache fails in the last 2 cases, because it cannot find the test.d to store:
sccache: encountered fatal error
sccache: error: failed to zip up compiler outputs
sccache: caused by: failed to zip up compiler outputs
sccache: caused by: failed to open file `"/home/alex/prj/sccache/test.d"`
sccache: caused by: failed to open file `/home/alex/prj/sccache/test.d`: No such file or directory (os error 2)
I'm using the clang 20.1.8 & gcc 13.3.0 on Ubuntu 24.04
P.S. I cannot just drop the -MF flag: in real world it's generated by CMake and cannot be disabled
Example:
In the first 2 calls (gcc & clang-20) file
test.dis generated, while in the second one it isn't.The sccache fails in the last 2 cases, because it cannot find the
test.dto store:I'm using the clang 20.1.8 & gcc 13.3.0 on Ubuntu 24.04
P.S. I cannot just drop the
-MFflag: in real world it's generated by CMake and cannot be disabled