]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
docs: Mention mitigation for direct mode caveat
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 19 Jul 2025 10:49:31 +0000 (12:49 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 21 Jul 2025 12:36:56 +0000 (14:36 +0200)
doc/MANUAL.adoc

index 72ab2d787dfbf7800315389fec16ddf1683d7884..5a62038c618e2d59535e9a3ef7a245153ebdf5a5 100644 (file)
@@ -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: