[ccache] Making ccache and clang compatible
Max Horn
max at quendi.de
Wed Jul 4 07:53:46 MDT 2012
Hi there,
I was wondering if anybody is looking into making ccache compatible with clang (or perhaps vice versa, making clang compatible with ccache -- but that seems harder to me right now). Or if somebody would be willing to look into it... I'd be happy to help, but am not familiar with the ccache code base... But let me first point out the issue:
Using ccache with clang tends to generate tons of warnings, which can range from simply being annoying, to causing autoconf failures. This is because ccache runs the compiler with "-E" on preprocessed input, but also passes -I, -isystem etc. flags on to the compiler. In clang, this triggers warnings about unused arguments. I just see that this has been reported before, roughly a year ago:
https://bugzilla.samba.org/show_bug.cgi?id=8118
https://bugzilla.samba.org/show_bug.cgi?id=8460
See also
http://petereisentraut.blogspot.de/2011/05/ccache-and-clang.html
From the outside, it seems to me that the simplest quick fix would be to detect clang and add "-Qunused-arguments" to the parameter list for it, to suppress these warnings. But of course that would effectively disable this warning completely, preventing it from triggering on actual issues. An alternative way would be to remove all -I, -isystem etc. from the arguments being passed to clang.
Cheers,
Max
More information about the ccache
mailing list