From 75549161c295d297e1f22061cdec6a6ec9c89c92 Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sat, 16 Aug 2025 16:46:47 +0200 Subject: [PATCH 1/2] Remove stray ')' --- docs/Local.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Local.md b/docs/Local.md index 52e84498e..808be1306 100644 --- a/docs/Local.md +++ b/docs/Local.md @@ -39,7 +39,7 @@ The preprocessor cache may silently produce stale results in any of the followin Configuration options and their default values: -- `use_preprocessor_cache_mode`: `true`. Whether to use preprocessor cache mode. This can be overridden for an sccache invocation by setting the environment variable `SCCACHE_DIRECT` to `true`/`on`/`1` or `false`/`off`/`0`). +- `use_preprocessor_cache_mode`: `true`. Whether to use preprocessor cache mode. This can be overridden for an sccache invocation by setting the environment variable `SCCACHE_DIRECT` to `true`/`on`/`1` or `false`/`off`/`0`. - `file_stat_matches`: `false`. If false, only compare header files by hashing their contents. If true, will use size + ctime + mtime to check whether a file has changed. See other flags below for more control over this behavior. - `use_ctime_for_stat`: `true`. If true, uses the ctime (file status change on UNIX, creation time on Windows) to check that a file has/hasn't changed. Can be useful to disable when backdating modification times in a controlled manner. From 6b6988745fc872ccf43aa509c0e4788ca85e723a Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sat, 16 Aug 2025 16:48:23 +0200 Subject: [PATCH 2/2] Clarify documentation about "the hash" (aka cache key) Especially what it means to hash but not cache a header, which really makes no sense to someone without much knowledge of implementation details. I think it's related to a cache entry being for one source file, but containing several candidate results distinguished by details about the headers they include. AFAIU, there is no reason to care about that as a user because it's always digest of various inputs (cache key) in, result or no result out. I think the new wording catches the gist of it. Reference: if system && config.skip_system_headers in remember_include_file() in c.rs and a bunch of related code. --- docs/Local.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Local.md b/docs/Local.md index 808be1306..f1b4543ca 100644 --- a/docs/Local.md +++ b/docs/Local.md @@ -45,9 +45,9 @@ Configuration options and their default values: - `ignore_time_macros`: `false`. If true, ignore `__DATE__`, `__TIME__` and `__TIMESTAMP__` being present in the source code. Will speed up preprocessor cache mode, but can produce stale results. -- `skip_system_headers`: `false`. If true, preprocessor cache mode will not cache system headers, only add them to the hash. +- `skip_system_headers`: `false`. If true, the preprocessor cache will only add the paths of included system headers to the cache key but ignore the headers' contents. -- `hash_working_directory`: `true`. If true, will add the current working directory to the hash to distinguish two compilations from different directories. +- `hash_working_directory`: `true`. If true, will add the current working directory to the cache key to distinguish two compilations from different directories. See where to write the config in [the configuration doc](Configuration.md).