[ccache] ccache for SWIG

William S Fulton wsf at fultondesigns.co.uk
Wed Nov 19 23:55:43 GMT 2008


I have modified ccache to work with SWIG (http://www.swig.org).

For those unfamiliar with SWIG it behaves much like a C++ compiler in 
many respects. It contains a preprocessor and parses C/C++ headers and 
SWIG directives, supporting -E. The main difference is the output which 
are the generated C/C++ wrapper files as well as target language files, 
for example a number of Python or Java files. The names of the files 
cannot be determined from the options passed to SWIG, so I had to add 
some modifications to SWIG the names of the generated files, which 
ccache would then pick up. I've done it in a generic way so that any 
compiler like tool with minor mods could be made to work with ccache. 
This combination of SWIG and ccache works very well providing the same 
sort of impressive speed ups as with C/C++ compilers.

I was wondering if these modifications can be incorporated into ccache 
itself? I have the code in the SWIG svn repository at 
http://swig.svn.sourceforge.net/viewvc/swig/trunk/CCache/. It contains 
the debian ccache patches (currently 12 patches) as well as the 
modifications for SWIG. I'm also wondering if we should ship this 
modified version with SWIG, I've called it ccache-swig for now. The 
ccache cvs repository doesn't seem very active of late, are there any 
plans for another release or adding committers able to make a release?

Any feedback appreciated.

William


More information about the ccache mailing list