Skip to content

Commit

Permalink
Improve documentation of hashed information
Browse files Browse the repository at this point in the history
  • Loading branch information
jrosdahl committed Nov 11, 2010
1 parent 99ea217 commit 18979c4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions MANUAL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,27 @@ The direct mode is generally faster since running the preprocessor has some
overhead.


Common hashed information
~~~~~~~~~~~~~~~~~~~~~~~~~

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)


The direct mode
~~~~~~~~~~~~~~~

In the direct mode, the hash is formed of:
In the direct mode, the hash is formed of the common information and:

* the input source file
* the command line options
* the real compiler's size and modification time (unless *CCACHE_COMPILERCHECK*
says something else)

Based on the hash, a data structure called ``manifest'' is looked up in the
cache. The manifest contains:
Expand Down Expand Up @@ -499,14 +511,12 @@ The direct mode will be disabled if any of the following holds:
The preprocessor mode
~~~~~~~~~~~~~~~~~~~~~

In the preprocessor mode, the hash is formed of:
In the preprocessor mode, the hash is formed of the common information and:

* the preprocessor output from running the compiler with *-E*
* 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)
* any standard error output generated by the preprocessor

Based on the hash, the cached compilation result can be looked up directly in
Expand Down

0 comments on commit 18979c4

Please sign in to comment.