]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add documentation to manual, for depend mode
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Sat, 25 Aug 2018 18:55:29 +0000 (20:55 +0200)
committerAnders F Björklund <anders.f.bjorklund@gmail.com>
Sat, 25 Aug 2018 18:56:04 +0000 (20:56 +0200)
doc/MANUAL.adoc

index 9bcc4ede787af7d320d85edc31fbd14ce4e45a9c..e48ea5fe9912cf73b7bce4f818243172ef05a4ef 100644 (file)
@@ -350,6 +350,11 @@ WRAPPERS>>.
     compiled, but that sometimes doesn't work. For example, when using the
     ``aCC'' compiler on HP-UX, set the cpp extension to *i*.
 
+*depend_mode* (*CCACHE_DEPEND* or *CCACHE_NODEPEND*, see <<_boolean_values,Boolean values>> above)::
+
+    If true, the depend mode will be used. The default is false. See
+    <<_the_depend_mode,THE DEPEND MODE>>.
+
 *direct_mode* (*CCACHE_DIRECT* or *CCACHE_NODIRECT*, see <<_boolean_values,Boolean values>> above)::
 
     If true, the direct mode will be used. The default is true. See
@@ -852,6 +857,32 @@ In the preprocessor mode, the hash is formed of the common information and:
 Based on the hash, the cached compilation result can be looked up directly in
 the cache.
 
+The depend mode
+~~~~~~~~~~~~~~~
+
+In the depend mode, the hash is formed of the common information and:
+
+* make dependencies, as generated by the compiler with *-MD* or *-MMD*
+
+When using *run_second_cpp* (which is the default now), ccache executes
+the preprocessor just to determine the object hash, and will do so for
+every cache miss. While compiling, the same work is done again.
+
+When executing a massively parallel build using ccache and distcc,
+the system controlling the build can get a fairly high load because of
+all these ccache-only preprocessor executions.
+
+Having only hashed compiler flags and per file checksums as in direct mode
+might be just enough for practical caching purposes.
+
+The dependencies also allows doing correct incremental builds, by allowing
+the build system to check if dependencies are up-to-date.
+
+The depend mode will be disabled if any of the following holds:
+
+* the configuration setting *depend_mode* is false
+* the compiler is not generating dependencies
+* the configuration setting *run_second_cpp* is false
 
 Compiling in different directories
 ----------------------------------