[ccache] @file arguments to ccache - Intel Compiler
joel at rosdahl.net
Tue Oct 20 20:49:27 UTC 2015
> I was wondering why in ccache we are expanding @file
@file is expanded so that ccache can inspect the options in the file just
like options given on the command line. The alternative is to not expand
@file arguments and instead just fall back to running the compiler without
caching. (This was how ccache behaved before support for @file was added in
2012, see commit 0da6ddc169f1edfcfb1c37d8aa45c4257cf6c5c5.)
Essentially, the arguments that are to be listed in @file are those that affect
> the preprocessor.
How do you come to that conclusion? @file can, at least for GCC, contain
So, is it safe to just pass on the @file as-is to compiler, without
> read and expand the arguments?
In general: no.
I'm unable to decide how to go about supporting Intel compiler, especially with
> the @file. Intel compiler apparently even accepts special char like
> hello.h$ or regex based input args inside the @file which might make
> ccache handle them more difficult.
Well, if you want to use ccache with the Intel compiler, don't put comments
and other non-GCC-compatible stuff in @files. :-) But perhaps it would be
possible to parse @files in a way that is backward compatible with how GCC
More information about the ccache