[ccache] Making ccache and clang compatible

Martin Pool mbp at sourcefrog.net
Tue Jul 10 18:34:18 MDT 2012


On 5 July 2012 21:35, Mike Frysinger <vapier at gentoo.org> wrote:

> On Wednesday 04 July 2012 09:53:46 Max Horn wrote:
> > 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.
>
> err, -I/-isystem/-D/-U/etc... are preprocessor flags and are valid when
> running
> in preprocessor mode (-E).  i don't know if clang is broken, or your
> analysis
> is incorrect, but certainly that behavior you describe is wrong.
> -mike
>

I agree with you there, Mike, but I think the bug originally described in <
https://bugzilla.samba.org/show_bug.cgi?id=8460> could possibly be valid.
 If you are compiling from a .i or .ii file, the -D and -I options can't
have any effect.  It's reasonable for clang to emit a warning about it, and
it would be reasonable for ccache to strip those options when compiling a
preprocessed file.

-- 
Martin


More information about the ccache mailing list