[ccache] [PATCH] Support Solaris Studio compiler
joel at rosdahl.net
Sun Feb 8 09:32:20 MST 2015
> I've added some new configuration options that will enable ccache to work
> with the Solaris Studio compiler. With these changes I'm able to use
> successfully for building OpenJDK 9 on Solaris.
Thanks for the patch!
I have previously had a sketchy idea about letting ccache do some kind of
probing to "learn" a compiler (see also
https://bugzilla.samba.org/show_bug.cgi?id=7556) to support compilers that
don't quite work like GCC. But that hasn't happened and maybe never will,
so introducing configuration options would perhaps be the most pragmatic
way. The concern I have is that ccache's code is becoming more complex and
hard to maintain with each small workaround and configuration option, so I
think that it's a good idea to try to limit the amount of special cases and
configurability if possible.
My guess is that cpp_generates_dep and extra_hash_extensions likely won't
be useful for other compilers than Solaris Studio. x_means_lang is
necessary but not sufficient to support the Intel compiler.
I'm thinking that we instead could introduce a configuration setting like
compiler_flavor (compiler_type, compiler_variant, mode, ...?) whose value
by default is guessed from the compiler name but can be set explicitly when
needed. Internally, ccache would then map compiler_flavor to needed
characteristics (run_second_cpp, cpp_generates_dep, etc.). What do you
(Erik and other list members) think about such an approach?
More information about the ccache