Software developers who routinely rebuild large projects would love ccache. Ccache is a compiler cache. It speeds up software rebuilds by caching the result of previous compilations and detecting when the same compilation is being done again.
I use ccache when compiling Linux kernel, Debian/Ubuntu packages, GNOME applications, Mozilla Firefox, FirefoxOS and Android operating system. You could enable ccache by prefixing ccache to your compilation command or update your system path to include ccache.
# Add the following line to your ~/.bashrc file
export PATH=/usr/lib/ccache:${PATH}
Alternatively you could create symlinks in ~/bin directory. GNOME 3 jhbuild documentation provides a bash script for this purpose.
cd ~/bin
for cmd in cc gcc c++ g++; do
ln -s /usr/bin/ccache $cmd
done
To take advantage of ccache while building Mozilla Firefox, append the following line to your .mozconfig.
ac_add_options --with-ccache
If you are compiling Android(ASOP), CyanogenMod or Firefox OS. Android build system includes the ccache program, set the USE_CCACHE environment variable to enable ccache.
$ export USE_CCACHE=1
Further more in-depth information, read the ccache manual page. Please do comment and share your experiences using CCache.
0 comments:
Post a Comment