We currently provide support for clcache on Windows (even though it's officially discontinued) and ccache on Linux/macOS.
Another compiler caching tool is buildcache which works on Windows, Linux and macOS. Some benchmarks show that it is on par with ccache (and better than clcache in my personal experience) if used with direct mode enabled (i.e. BUILDCACHE_DIRECT_MODE set to true). (When it comes to the cache size, like ccache it can be compressed, e.g., by having BUILDCACHE_COMPRESS_FORMAT set to ZSTD.)
So, here I would recommend adding support buildcache and making it the preference, should clcache/ccache also be present.
FWIW, on my MacBook Pro:
With no compiler caching tool:
ninja 312.17s user 22.39s system 1074% cpu 31.147 total
ninja 309.83s user 22.22s system 1056% cpu 31.432 total
ninja 325.33s user 23.41s system 1061% cpu 32.862 total
We currently provide support for
clcache
on Windows (even though it's officially discontinued) andccache
on Linux/macOS.Another compiler caching tool is
buildcache
which works on Windows, Linux and macOS. Some benchmarks show that it is on par withccache
(and better thanclcache
in my personal experience) if used with direct mode enabled (i.e.BUILDCACHE_DIRECT_MODE
set totrue
). (When it comes to the cache size, likeccache
it can be compressed, e.g., by havingBUILDCACHE_COMPRESS_FORMAT
set toZSTD
.)So, here I would recommend adding support
buildcache
and making it the preference, shouldclcache
/ccache
also be present.FWIW, on my MacBook Pro:
ninja 312.17s user 22.39s system 1074% cpu 31.147 total
ninja 309.83s user 22.22s system 1056% cpu 31.432 total
ninja 325.33s user 23.41s system 1061% cpu 32.862 total
buildcache
:ninja 324.32s user 40.01s system 1021% cpu 35.678 total
ninja 348.76s user 43.44s system 1034% cpu 37.906 total
ninja 340.35s user 42.02s system 1061% cpu 36.008 total
ninja 56.89s user 9.63s system 890% cpu 7.469 total
ninja 57.38s user 9.74s system 913% cpu 7.345 total
ninja 57.22s user 9.83s system 954% cpu 7.023 total