[ccache] GCC '@' parameters

Boie, Andrew P andrew.p.boie at intel.com
Wed Jul 11 13:05:08 MDT 2012


I've been playing around with using the 3.x series of ccache to speed up Android builds (they by default use an old 2.x prebuilt copy) and have run into an incompatibility where I get 'unsupported compiler option' when the @file parameter is used. Android started using this extensively in Jelly Bean.

>From the documentation in http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html:

@file
Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.
Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.

However any invocation of ccache where this is used in the GCC command line results in "Unsupported Compiler Option" with ccache 3.x:

[2012-07-11T12:02:49.208752 11127] Compiler option @out/target/product/full_x86/obj/STATIC_LIBRARIES/libv8_intermediates/import_includes is unsupported

ccache 2.x seems OK with this, but is probably computing incorrect command line hashes since it's not diving into the file to see the command line options within. Any advice for getting around this?

Regards,
Andrew Boie


More information about the ccache mailing list