From: Joel Rosdahl Date: Sat, 19 Jul 2025 10:49:31 +0000 (+0200) Subject: docs: Mention mitigation for direct mode caveat X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=20c9ada75fdcf48c459c365eccbfe144253c5b1e;p=thirdparty%2Fccache.git docs: Mention mitigation for direct mode caveat --- diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 72ab2d78..5a62038c 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -1654,10 +1654,12 @@ result. There is a catch with the direct mode: header files that were used by the compiler are recorded, but header files that were *not* used, but would have -been used if they existed, are not. So, when ccache checks if a result can be -taken from the cache, it currently can't check if the existence of a new header -file should invalidate the result. In practice, the direct mode is safe to use -in the absolute majority of cases. +been used if they existed, are not. To mitigate this problem, ccache records +whether directories specified with `-I` and similar exist at the time of +compilation, which handles most cases. Still, when ccache checks if a result can +be taken from the cache, it currently can't check with 100% accuracy if the +existence of a new header file should invalidate the result. In practice, the +direct mode is safe to use in the absolute majority of cases. The direct mode will be disabled if any of the following holds: