[ccache] Duplicated -arch option results in "unsupported compiler option"

Joel Rosdahl joel at rosdahl.net
Tue Oct 20 20:50:58 UTC 2015


>
> When invoking ccache with twice -arch option, it fails to use its cache
> and "unsupported compiler option" counter increment.


That's because -arch options can be given multiple times (with different
values) to create "fat binaries" on Darwin, and ccache can't handle that,
so it bails out. So it's expected but unfortunate in your case.

Similarly, invoking it twice with -Wall option results in cache not being
> used:


(You do get a "cache hit (preprocessed)", though.)

The reason for not discarding repeated options is primarily because nobody
has implemented such a feature. But I don't think that it would be a good
idea do it either since it sounds very hard to get it robust. Some options
have different semantics if given multiple times – one simple example is
"-include foo.h -include foo.h" which is not the same as "-include foo.h".
And it must work for all compiler options, even future ones.

-- Joel


More information about the ccache mailing list