From: Anders F Björklund Date: Sat, 25 Aug 2018 18:55:29 +0000 (+0200) Subject: Add documentation to manual, for depend mode X-Git-Tag: v3.6~31^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60ced47fb60b468c0bf45307d288d6e1c823faae;p=thirdparty%2Fccache.git Add documentation to manual, for depend mode --- diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 9bcc4ede7..e48ea5fe9 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -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 ----------------------------------