The Samba-Bugzilla – Bug 8118
don't pass -D, -I, -U to compiler
Last modified: 2014-11-17 19:24:06 UTC
clang is apparently quite picky about passing inappropriate options to preprocessor vs. compiler. With 3.1.4 a call to 'ccache clang' spits out this::
clang: warning: argument unused during compilation: '-c'
This was fixed in commit f0db645c75a2c063526685b791a4afd7b2884d1d.
But the quasi-opposite problem still exists, of the sort
clang: warning: argument unused during compilation: '-I .'
and similar to -D and -U options. You might want to exclude these from being passed to the stage that compiles the preprocessed output.
Btw., you can avoid these warnings by using the option -Qunused-arguments, and really they don't hurt, but by default behavior of the combination ccache and clang is quite "scary".
David Givone made a patch (thanks!) that solves this. Applied in 1ea5033e2d0d8a53d16ba694cd8d5324e27dac2a.
(In reply to comment #1)
> David Givone made a patch (thanks!) that solves this. Applied in
For clang, both f0db645c75a2c063526685b791a4afd7b2884d1d and 1ea5033e2d0d8a53d16ba694cd8d5324e27dac2a work for me to fix this issue. It would be nice if this was released in 3.1.x
(In reply to comment #2)
> For clang, both f0db645c75a2c063526685b791a4afd7b2884d1d and
> 1ea5033e2d0d8a53d16ba694cd8d5324e27dac2a work for me to fix this issue. It
> would be nice if this was released in 3.1.x
I think that this is a too large change of behavior for a bug fix release. (3.1 doesn't have official clang support, by the way.) The development version of ccache (which will become 3.2 eventually) has other clang-related fixes as well, and yes, it's really about time to release 3.2...
Included in v3.2.