=========
-NAME
+Name
----
ccache - a fast C/C++ compiler cache
-SYNOPSIS
+Synopsis
--------
[verse]
'compiler' ['compiler options'] (via symbolic link)
-DESCRIPTION
+Description
-----------
ccache is a compiler cache. It speeds up recompilation by caching the result of
where ccache changes the output of your compiler, please let us know.
-FEATURES
+Features
~~~~~~~~
* Keeps statistics on hits/misses.
* Optionally compresses files in the cache to reduce disk space.
-LIMITATIONS
+Limitations
~~~~~~~~~~~
* Only knows how to cache the compilation of a single
will silently fall back to running the real compiler.
-RUN MODES
+Run modes
---------
There are two ways to use ccache. You can either prefix your compilation
``interesting'' problems.
-OPTIONS
+Options
-------
These options only apply when you invoke ccache as ``ccache''. When invoked as
Zero the cache statistics (but not the configured limits).
-EXTRA OPTIONS
+Extra options
-------------
When run as a compiler, ccache usually just takes the same command line options
file name and instead be passed along to the compiler as a command line option.
-ENVIRONMENT VARIABLES
+Environment variables
---------------------
ccache uses a number of environment variables to control operation. In most
hash, so cached compilations with *CCACHE_UNIFY* set cannot be used when
*CCACHE_UNIFY* is not set and vice versa. The reason the unifier is off by
default is that it can give incorrect line number information in compiler
- warning messages. *Note*: Enabling the unifier implies turning off the
- direct mode.
+ warning messages. Also note that enabling the unifier implies turning off
+ the direct mode.
-CACHE SIZE MANAGEMENT
+Cache size management
---------------------
By default ccache has a one gigabyte limit on the total size of files in the
various statistics).
-CACHE COMPRESSION
+Cache compression
-----------------
ccache can optionally compress all files it puts into the cache using the
variable.
-HOW CCACHE WORKS
+How ccache works
----------------
The basic idea is to detect when you are compiling exactly the same code a
* the *preprocessor mode* (hashes output from the preprocessor)
-THE DIRECT MODE
+The direct mode
~~~~~~~~~~~~~~~
In the direct mode, the hash is formed of:
the source code
-THE PREPROCESSOR MODE
+The preprocessor mode
~~~~~~~~~~~~~~~~~~~~~
In the preprocessor mode, the hash is formed of:
* the command line options except options that affect include files (*-I*,
*-include*, *-D*, etc; the theory is that these options will change the
preprocessor output if they have any effect at all)
-* the real compiler's size and modification time (unless CCACHE_COMPILERCHECK*
- *says something else)
+* the real compiler's size and modification time (unless *CCACHE_COMPILERCHECK*
+ says something else)
* any standard error output generated by the preprocessor
Based on the hash, the cached compilation result can be looked up directly in
the cache.
-COMPILING IN DIFFERENT DIRECTORIES
+Compiling in different directories
----------------------------------
Some information included in the hash that identifies a unique compilation may
``cd'' command in GDB.
-SHARING A CACHE
+Sharing a cache
---------------
A group of developers can increase the cache hit rate by sharing a cache
appropriately, as discussed in the previous section.
-SHARING A CACHE ON NFS
+Sharing a cache on NFS
----------------------
It is possible to put the cache directory on an NFS filesystem (or similar
traffic for temporary files.
-USING CCACHE WITH DISTCC
+Using ccache with distcc
------------------------
``distcc'' is a very useful program for distributing compilation across a range
results will not be shared between compilations with and without distcc.
-BUGS
+Bugs
----
* ccache doesn't handle the GNU Assembler's *.incbin* directive correctly. This
-TROUBLESHOOTING
+Troubleshooting
---------------
-GENERAL
+General
~~~~~~~
A general tip for getting information about what ccache is doing is to enable
of keeping track of what is happening is to check the output of *ccache -s*.
-PERFORMANCE
+Performance
~~~~~~~~~~~
ccache has been written to perform well out of the box, but sometimes you may
and check which option was rejected.
-ERRORS WHEN COMPILING WITH CCACHE
+Errors when compiling with ccache
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If compilation doesn't work with ccache, but it works without it, one possible
slower, though, so it is better to find and fix the root cause.
-CORRUPT OBJECT FILES
+Corrupt object files
~~~~~~~~~~~~~~~~~~~~
It should be noted that ccache is susceptible to general storage problems. If a
case, please report it.
-MORE INFORMATION
+More information
----------------
Credits, mailing list information, bug reporting instructions, source code,
etc, can be found on ccache's web site: <http://ccache.samba.org>.
-AUTHOR
+Author
------
ccache was originally written by Andrew Tridgell and is currently maintained by