Ccache with the same code base and multiple tools

Our system supports the creation of three different toolkits (gcc, icc, diab). I am not sure if using ccache is safe in this case. My concern is this: if I build with gcc and then rebuild with diab, will I get a ccache hit if the files and their dependencies are the same?

I don't need a beat in this case, since I want the files to be recompiled with diab.

+3
source share
1 answer

You will not get ccache attacks between different compilers. The hashed compiler. Alternatively, you can change the CCACHE_COMPILERCHECK environment variable to test the compiler differently. As shown in the caching guide :

For both modes, the following information is included in the hash:

    the extension used by the compiler for a file with preprocessor output (normally .i for C code and .ii for C++ code)

    the compiler’s size and modification time (or other compiler-specific information specified by CCACHE_COMPILERCHECK)

    the name of the compiler

    the current directory (if CCACHE_HASHDIR is set)

    contents of files specified by CCACHE_EXTRAFILES (if any)
+4
source

All Articles