5 Release date: 2023-08-29
9 - Fixed various problems with parsing of MSVC response file (`.rsp`). +
10 [small]#_[contributed by Jiri Hörner]_#
12 - Fixed handling of NVCC `-Xcompiler` and `--Werror` options. +
13 [small]#_[contributed by Andrew Hardin]_#
15 - Fixed bookkeeping of files when hard linking or file cloning is enabled. In
16 ccache 4.8–4.8.2 this could result in incorrect size/count statistics after
17 automatic or explicit cleanup. +
18 [small]#_[contributed by Joel Rosdahl]_#
21 === Build improvements
23 - Made a workaround for GCC 12.3 bug 109241 where GCC fails to compile ccache. +
24 [small]#_[contributed by Joel Rosdahl]_#
26 - Upgraded to xxHash 0.8.2, which fixes compilation of ccache with GCC 12 and
28 [small]#_[contributed by Joel Rosdahl]_#
33 Release date: 2023-06-12
38 - Fixed parsing of Windows drive letter in file URLs for remote storage. +
39 [small]#_[contributed by Joel Rosdahl]_#
41 - Fixed a bug affecting depend mode with MSVC. +
42 [small]#_[contributed by Huang Qin Jin]_#
44 - Ccache no longer passes `-v` to the preprocessor. This improves preprocessor
45 mode hit rate when `-v` is on the compiler command line. +
46 [small]#_[contributed by Joel Rosdahl]_#
48 - Made `--trim-max-size` accept 0 for no limit. +
49 [small]#_[contributed by Joel Rosdahl]_#
52 === Build improvements
54 - Made various fixes for Windows 64-bit MSBuild builds. +
55 [small]#_[contributed by Rafael Kitover]_#
57 - Silenced CMake warning for extracted timestamps. +
58 [small]#_[contributed by Rafael Kitover]_#
60 - Worked around problem with building ZStandard with Xcode. +
61 [small]#_[contributed by Gregor Jasny]_#
63 - Fixed undefined behavior (only triggered by unit tests) in
64 `util::read_file_part` for zero count, making the build fail with
65 `+_GLIBCXX_ASSERTIONS+`. +
66 [small]#_[contributed by Joel Rosdahl]_#
69 === Documentation improvements
71 - Clarified `--evict-older-than` semantics. +
72 [small]#_[contributed by Joel Rosdahl]_#
77 - Fixed typo in "`Directory is not hashed if using -gz`" test. +
78 [small]#_[contributed by Sam James]_#
83 Release date: 2023-05-19
88 - Fixed an issue with the depend mode in combination with `--` on the command
89 line for Clang-based compilers. +
90 [small]#_[contributed by Joel Rosdahl]_#
92 - Improved knowledge about MSVC debug flags so that non-debug `/Z*` options are
93 once again supported. +
94 [small]#_[contributed by Stephan Rohmen]_#
96 - Ccache no longer treats `/Zi` as unsupported for clang-cl. +
97 [small]#_[contributed by Tobias Hieta]_#
99 - Made the output format of `ccache -k max_size` parsable by ccache itself. +
100 [small]#_[contributed by Joel Rosdahl]_#
103 === Build/CI improvements
105 - Corrected ccache version in the macOS binary release. +
106 [small]#_[contributed by Joel Rosdahl]_#
108 - Made it possible to build ccache with clang-cl on Windows. +
109 [small]#_[contributed by Tobias Hieta]_#
111 - Upgraded to doctest 2.4.11, thereby fixing a build issue on Solaris. +
112 [small]#_[contributed by Joel Rosdahl]_#
115 === Documentation improvements
117 - Added a remote file storage example with URL-encoded spaces. +
118 [small]#_[contributed by Joel Rosdahl]_
123 Release date: 2023-03-12
126 === New features and improvements
128 - Improved the automatic cache cleanup mechanism. Automatic cleanups are now
129 performed on 1/256 of the cache instead of 1/16, thus making them much quicker
130 (but naturally more frequent). Cleanups are coordinated between ccache
131 processes so that at most one process will perform cleanup at a time. Also,
132 the actual cache size will stay very close to the configured maximum size
133 instead of staying around 90% as was the case before. +
134 [small]#_[contributed by Joel Rosdahl]_#
136 - Added support for setting per-compilation configuration options on the command
137 line. Example: `ccache hash_dir=false gcc -c example.c`. +
138 [small]#_[contributed by Joel Rosdahl]_#
140 - Made it possible to disable ccache for a certain source code file by embedding
141 the string `ccache:disable` in a comment near the top of the file. +
142 [small]#_[contributed by Joel Rosdahl]_#
144 - Made ccache understand that an MSVC `/Z7` option overrides an earlier `/Z*`
145 option and thus is not too hard to cache. +
146 [small]#_[contributed by Joel Rosdahl]_#
148 - Added a `--recompress-threads` command line option for selecting the number of
149 CPU threads to use when recompressing the local cache. +
150 [small]#_[contributed by Joel Rosdahl]_#
152 - Added `--trim-recompress` and `--trim-recompress-threads` command line options
153 for recompressing file-based remote storage. +
154 [small]#_[contributed by Joel Rosdahl]_#
156 - Added tmpfs, ufs and zfs to the list of supported filesystems on macOS and
157 BSDs for the inode cache. +
158 [small]#_[contributed by Oleg Sidorkin]_#
160 - Improved progress bars for clean/clear/evict-style operations. +
161 [small]#_[contributed by Joel Rosdahl]_#
163 - Improved printing of cache sizes in various outputs. +
164 [small]#_[contributed by Joel Rosdahl]_#
166 - Activate debug logging for command mode options like `--cleanup`. +
167 [small]#_[contributed by Joel Rosdahl]_#
169 - Added support for `-Wp,-U<macro>` in the direct mode. +
170 [small]#_[contributed by Joel Rosdahl]_#
172 - Added quotes around arguments with space in logged command lines. +
173 [small]#_[contributed by Joel Rosdahl]_#
175 - Added logging of executed command lines on Windows. +
176 [small]#_[contributed by Joel Rosdahl]_#
178 - Made sure not to update the stats file when there are no incremented
180 [small]#_[contributed by Joel Rosdahl]_#
182 - Improved actual disk size calculation on Windows. +
183 [small]#_[contributed by Joel Rosdahl]_#
186 === Build/CI improvements
188 - Added CI support for building macOS universal binaries. +
189 [small]#_[contributed by Raihaan Shouhell]_#
191 - Make it possible to force download of Zstd and Hiredis, e.g. with `cmake -D
192 ZSTD_FROM_INTERNET=ON [...]`. +
193 [small]#_[contributed by Joel Rosdahl]_#
198 - Fixed an edge case where a non-temporal identifier is misidentified. +
199 [small]#_[contributed by Erik Flodin]_#
201 - Fixed reporting of local/remote cache misses in depend mode. +
202 [small]#_[contributed by Joel Rosdahl]_#
204 - Fixed parsing of backslashes in MSVC RSP files. +
205 [small]#_[contributed by Raihaan Shouhell]_#
207 - Fixed a crash in `--show-log-stats` when the stats log file doesn't exist. +
208 [small]#_[contributed by Joel Rosdahl]_#
210 - Fixed matching of base directory for MSVC. The base directory will now match
211 case-insensitively with absolute paths in preprocessed output, or from
212 `/showIncludes` in the depend mode case, when compiling with MSVC. +
213 [small]#_[contributed by Joel Rosdahl]_#
215 - Fixed a problem where the original umask would be used when storing a remote
216 cache result in the local cache. +
217 [small]#_[contributed by Joel Rosdahl]_#
219 - Changed the inode cache implementation to use spinlocks instead of pthread
220 mutexes. This makes the inode cache work on FreeBSD and similar systems. +
221 [small]#_[contributed by Oleg Sidorkin]_#
223 - Don't treat `-Wp,-D` as interchangeable with `-D`. +
224 [small]#_[contributed by Joel Rosdahl]_#
226 - Disable the inode cache if the filesystem risks getting full soon. This fixes
227 a problem when the cache is on a filesystem where `posix_fallocate` isn't
228 reliable, like Btrfs with compression enabled. +
229 [small]#_[contributed by Joel Rosdahl]_#
231 - Fixed performance of cache path relativization in preprocessed output,
232 primarily on Windows where `stat` calls are relatively costly. +
233 [small]#_[contributed by Joel Rosdahl]_#
235 - Fixed rare crash in the signal handler at process exit. +
236 [small]#_[contributed by Joel Rosdahl]_#
238 - Fixed handling of Unix-style paths passed to MSVC. +
239 [small]#_[contributed by Joel Rosdahl]_#
241 - Fixed so that the config options and command line are logged before trying to
242 locate the compiler and exiting early. +
243 [small]#_[contributed by Joel Rosdahl]_#
246 === Documentation improvements
248 - Improved description of `--set-config`. +
249 [small]#_[contributed by Joel Rosdahl]_#
251 - Fixed broken markup in the manual. +
252 [small]#_[contributed by Joel Rosdahl]_#
254 - Added a note to the manual that `stats = false` will disable automatic
256 [small]#_[contributed by Joel Rosdahl]_#
258 - Fix a bad reference to the "`Remote storage backends`" section. +
259 [small]#_[contributed by Joel Rosdahl]_#
264 Release date: 2023-03-20
268 - Disabled the inode cache by default again since there have reports of ccache
269 processes hanging on futex calls related to the inode cache. +
270 [small]#_[contributed by Joel Rosdahl]_#
275 Release date: 2022-11-21
280 - Fixed an inode cache race condition. +
281 [small]#_[contributed by Joel Rosdahl]_#
283 - The default temporary directory is now `$XDG_RUNTIME_DIR/ccache-tmp` instead
284 of a hardcoded `/run/user/<UID>/ccache-tmp`. If `XDG_RUNTIME_DIR` is not set,
285 `<cache_dir>/tmp` is used. This avoids creating `/run/user/<UID>` on systems
286 that don't have it if compiling as root. +
287 [small]#_[contributed by Joel Rosdahl and Oleg Sidorkin]_#
289 - Added a fallback in case `posix_fallocate` returns `EINVAL` when creating the
291 [small]#_[contributed by Oleg Sidorkin]_#
293 - Connection timeout for an HTTP connection is now reported as a timeout instead
295 [small]#_[contributed by Joel Rosdahl]_#
297 - Temporary files found in the cache are no longer counted in
298 `--show-compression`. +
299 [small]#_[contributed by Joel Rosdahl]_#
301 - Removed duplicate magic header in output from `--inspect`. +
302 [small]#_[contributed by Joel Rosdahl]_#
304 - Ccache now properly waits for all recompression jobs to finish when there is
305 no `f` subdirectory in the cache. +
306 [small]#_[contributed by Joel Rosdahl]_#
309 === Other minor improvements
311 - Improved inode cache logging. +
312 [small]#_[contributed by Joel Rosdahl]_#
315 === Documentation improvements
317 - Removed stray parenthesis. +
318 [small]#_[contributed by Joel Rosdahl]_#
320 - Improved description of how header files are handled. +
321 [small]#_[contributed by Joel Rosdahl]_#
323 - Added a hint about using `-fno-pch-timestamp` for precompiled headers with
325 [small]#_[contributed by Joel Rosdahl]_#
327 - Removed obsolete description of compiler type "`pump`". +
328 [small]#_[contributed by Joel Rosdahl]_#
334 Release date: 2022-11-05
337 === New features and improvements
339 - Re-added support for handling a `-Wp,-MD` or `-Wp,-MMD` option with `-o` but
340 without `-MMD`, `-MQ` or `-MT` for GCC and Clang. (This combination of options
341 is used by the Linux kernel build system and became unsupported as a
342 side-effect of a feature added in ccache 4.7.) +
343 [small]#_[contributed by Joel Rosdahl]_#
345 - Variables that affect Clang version on macOS are now added to the input
347 [small]#_[contributed by Joel Rosdahl]_#
349 - Variables that affect the underlying compiler used by ICC (the Intel compiler)
350 are now added to the input hash. +
351 [small]#_[contributed by Joel Rosdahl]_#
356 - Fixed parsing of sloppiness with a trailing delimiter. +
357 [small]#_[contributed by Joel Rosdahl]_#
360 === Other minor improvements
362 - Removed a redundant slash in URLs when querying remote HTTP storage. +
363 [small]#_[contributed by Joel Rosdahl]_#
365 - Improved logging related to the inode cache. +
366 [small]#_[contributed by Joel Rosdahl]_#
369 === Documentation improvements
371 - Added documentation of the default value of *keep_comments_cpp*. +
372 [small]#_[contributed by Joel Rosdahl]_#
375 === Test improvements
377 - Silenced various benign test warnings. +
378 [small]#_[contributed by Joel Rosdahl]_#
383 Release date: 2022-10-29
388 - Fixed a problem when using 32-bit and 64-bit ccache binaries with the same
390 [small]#_[contributed by Joel Rosdahl]_#
392 - Ccache now processes the argument following a `-Xarch` option. +
393 [small]#_[contributed by an anonymous user]_#
395 - Made sure to use the configured umask for command line operations like
396 `--zero-stats` so that newly created cache directories will have correct
398 [small]#_[contributed by Joel Rosdahl]_#
401 === Build improvements
403 - Include `limits.h` for `PATH_MAX`. +
404 [small]#_[contributed by Joel Rosdahl]_#
407 === Test improvements
409 - Disabled flaky Windows profiling tests. +
410 [small]#_[contributed by Joel Rosdahl]_#
415 Release date: 2022-10-22
420 - Fixed a regression in 4.7 related to using the `-MD` or `-MMD` option when
421 compiling an assembler file. +
422 [small]#_[contributed by Joel Rosdahl]_#
425 === Build improvements
427 - Added support for compiling ccache with GCC 8. +
428 [small]#_[contributed by Orgad Shaneh]_#
430 - Removed unneeded C++11 flag in libatomic test. +
431 [small]#_[contributed by Orgad Shaneh]_#
436 Release date: 2022-10-17
439 === Compatibility notes
441 - The cache entry format has changed, so ccache 4.7 will not share cache entries
442 with earlier versions. Different ccache versions can however still use the
443 same cache storage without any issues.
445 - The https://ccache.dev/manual/4.7.html#config_cache_dir[default location of
446 the cache directory] on Windows has been changed from `%APPDATA%\ccache` to
447 `%LOCALAPPDATA%\ccache`. Please remove any existing `%APPDATA%\ccache`
448 directory or move it to `%LOCALAPPDATA%\ccache` to keep it.
453 - A C++17 compiler and CMake 3.15 or newer are now required to
457 === New and improved features
459 - The https://ccache.dev/manual/4.7.html#config_inode_cache[inode cache] is now
460 enabled by default, but only if the filesystem where ccache's temporary
461 directory is located is known to work with the inode cache. +
462 [small]#_[contributed by Joel Rosdahl]_#
464 - Improved performance of cache entry reading and writing. +
465 [small]#_[contributed by Joel Rosdahl]_#
467 - Added a https://ccache.dev/manual/4.7.html#config_remote_only[*remote_only*]
468 configuration option, which tells ccache to disable local storage. This way,
469 ccache can use a shared
470 link:pass:[https://ccache.dev/manual/4.7.html#_remote_storage_backends][network cache]
471 without writing cache entries locally, which can be useful if the local
472 storage is ephemeral. +
473 [small]#_[contributed by Joel Rosdahl]_#
475 - Renamed configuration option *secondary_storage* to
476 https://ccache.dev/manual/4.7.html#config_remote_storage[*remote_storage*].
477 The old spelling will still work as a deprecated alias. +
478 [small]#_[contributed by Joel Rosdahl]_#
480 - Improved handling of manifests when using both local and remote storage.
482 On a cache miss, ccache used to update the local manifest file and write it to
483 remote storage, thereby overwriting any preexisting manifest entries on remote
484 storage. Similarly, the local manifest could be replaced by the remote manifest
485 on a remote cache hit, thus discarding local entries. This has now been improved
486 so that ccache will merge local and remote manifest entries transparently. +
487 [small]#_[contributed by Joel Rosdahl and an anonymous user]_#
489 - Added support for caching assembler listing files with compiler option
490 `-Wa,-a=file`. This also fixes a bug in ccache 4.6.2+ where usage of
491 `-Wa,-march=...` makes ccache fall back to running the compiler. +
492 [small]#_[contributed by Joel Rosdahl]_#
494 - Improved statistics shown by `ccache --show-stats`. Most values are now shown
495 in relation to a total count, and some less useful statistics counters have
496 been changed to be displayed only with `--verbose`. +
497 [small]#_[contributed by Joel Rosdahl]_#
499 - Improved statistics for remote hits and misses. +
500 [small]#_[contributed by Joel Rosdahl]_#
502 - Renamed "`Primary config`" to "`Config file`" and "`Secondary config`" to
503 "`System config file`" in the output of `ccache --show-stats --verbose`. +
504 [small]#_[contributed by Joel Rosdahl]_#
507 link:pass:[https://ccache.dev/manual/4.7.html#_run_modes][masquerading as a
508 compiler] via a copy or hard link of the ccache executable. Previously, ccache
509 only supported masquerading as a compiler by using a symbolic link. +
510 [small]#_[contributed by Joel Rosdahl]_#
512 - A timestamp is now included in
513 link:pass:[https://ccache.dev/manual/4.7.html#_cache_debugging][per-object
514 debug filenames]. This makes it easier to compare two builds without having to
515 save previous debug files before the second build. It also makes sure debug
516 files won't be overwritten if an object file is compiled several times during
518 [small]#_[contributed by Joel Rosdahl]_#
520 - Added support for Clang's `--` option. +
521 [small]#_[contributed by Joel Rosdahl]_#
523 - Cache entries are now shared for different `-MT`/`-MQ` options. +
524 [small]#_[contributed by Joel Rosdahl]_#
526 - The https://ccache.dev/manual/4.7.html#config_cache_dir[default location of
527 the cache directory] on Windows has been changed to `%LOCALAPPDATA%\ccache`,
528 both in Windows Bash and Windows native environments such as CMD or
531 Previous ccache versions defaulted to storing the cache in `%APPDATA%\ccache` on
532 Windows in native environment (i.e., when the `%USER%` variable was not set),
533 which could result in large network file transfers of the cache in domain
534 environments and similar problems. +
535 [small]#_[contributed by Rafael Kitover]_#
537 - Ccache now uses subsecond resolution timestamps when checking for "`too new
538 include files`". In practice, this means that the direct mode will no longer
539 be disabled for newly generated include files. +
540 [small]#_[contributed by Joel Rosdahl]_#
542 - Started using subsecond resolution timestamps in manifest files. This improves
543 accuracy with *file_stat_matches*
544 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
545 [small]#_[contributed by Joel Rosdahl]_#
547 - Added support for subsecond timestamps on macOS. +
548 [small]#_[contributed by Joel Rosdahl]_#
550 - Added link:pass:[https://ccache.dev/manual/4.7.html#_the_depend_mode][depend
551 mode] support for MSVC. +
552 [small]#_[contributed by Orgad Shaneh and Luboš Luňák]_#
554 - Added support for the Intel compiler on Windows. +
555 [small]#_[contributed by Daniel Richtmann]_#
557 - Ccache now sets `CCACHE_DISABLE` when running the compiler. This avoids
558 running ccache twice (and potentially storing two different results in the
559 cache) if, for instance, the compiler happens to be a wrapper script that in
560 turn runs `ccache $compiler ...`. +
561 [small]#_[contributed by Joel Rosdahl]_#
563 - Added support for Redis over Unix sockets. +
564 [small]#_[contributed by Anders F Björklund]_#
566 - Added support for GCC's `-fprofile-abs-path` option by including the current
567 working directory in the input hash. To opt out of this, set *gcno_cwd*
568 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
569 [small]#_[contributed by Joel Rosdahl]_#
571 - Made it possible to exclude `-frandom-seed=_seed_` options from the input hash
572 with a new *random_seed*
573 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
574 [small]#_[contributed by Raihaan Shouhell]_#
576 - Added support for server name in
577 link:pass:[https://ccache.dev/manual/4.7.html#_file_storage_backend][remote
578 storage file URLs] on Windows. +
579 [small]#_[contributed by Joel Rosdahl]_#
581 - Configuration file locations are now included in the
582 link:pass:[https://ccache.dev/manual/4.7.html#_cache_debugging][debug log]. +
583 [small]#_[contributed by Joel Rosdahl]_#
585 - The inode cache file is no longer removed with `ccache --clear`. +
586 [small]#_[contributed by Joel Rosdahl]_#
588 - Result format version and number of files are now printed when inspecting a
589 result cache entry file. +
590 [small]#_[contributed by Joel Rosdahl]_#
595 - Removed the *share-hits* attribute for remote storage. It has been superseded
596 by the https://ccache.dev/manual/4.7.html#config_remote_only[*remote_only*]
597 configuration option. +
598 [small]#_[contributed by Joel Rosdahl]_#
600 - Buggy support for GCC-specific environment variables `DEPENDENCIES_OUTPUT` and
601 `SUNPRO_DEPENDENCIES` has been removed. If any of those variables are set,
602 ccache now just falls back to running the real compiler. +
603 [small]#_[contributed by Joel Rosdahl]_#
608 - The correct dependency target will now be produced even when a
609 https://ccache.dev/manual/4.7.html#config_base_dir[base directory] is used --
610 the dependency target will still be an absolute path. +
611 [small]#_[contributed by Joel Rosdahl]_#
613 - Fixed a bug that could lead to bad modification timestamp (mtime) for object
614 files on systems that lack `utimensat` and `utimes` system calls (such as
616 [small]#_[contributed by Joel Rosdahl]_#
618 - Fixed ordering of MSVC include directory options when using
619 `/external:I<directory>`. +
620 [small]#_[contributed by Raihaan Shouhell]_#
622 - Fixed capturing of MSVC stdout/stderr when running from Visual Studio. +
623 [small]#_[contributed by Orgad Shaneh]_#
625 - Carriage return characters are now retained in the compiler output on
627 [small]#_[contributed by Orgad Shaneh]_#
629 - Made sure not to increment the "`preprocessed_cache_miss`" counter in recache
631 [small]#_[contributed by Joel Rosdahl]_#
633 - Fixed an issue with the inode cache in combination with
634 `+__DATE__+`/`+__TIME__+`/`+__TIMESTAMP__+` macros in the source code. +
635 [small]#_[contributed by Joel Rosdahl]_#
637 - Made sure to enable the inode cache only if subsecond timestamps are
639 [small]#_[contributed by Joel Rosdahl]_#
641 - Cache entries created with enabled hard linking or file cloning are no longer
642 written to remote storage since they won't be possible to retrieve correctly
644 [small]#_[contributed by Joel Rosdahl]_#
646 - Ccache now accepts spaces between target and colon when parsing dependency
647 files in the depend mode. +
648 [small]#_[contributed by Louis Caron]_#
650 - Fixed a crash when failing to write an error message to stderr after failing
651 to write to the log file. +
652 [small]#_[contributed by Joel Rosdahl]_#
654 - Made ccache able to retrieve an object file from the cache even if the
655 destination object file exists and is read-only. +
656 [small]#_[contributed by Joel Rosdahl]_#
658 - The `.exe` extension is now stripped from the ccache executable name in
659 `ccache --version` on Windows. +
660 [small]#_[contributed by Orgad Shaneh]_#
662 - Fixed naming of temporary files written to the cache directory. +
663 [small]#_[contributed by Joel Rosdahl]_#
666 === Build improvements
668 - Enabled static runtime linking for MSVC. +
669 [small]#_[contributed by Cristian Adam and Rafael Kitover]_#
671 - The Zstandard and Hiredis dependencies are now by default downloaded from the
672 Internet when unavailable. +
673 [small]#_[contributed by Rafael Kitover]_#
675 - Added support for pkgconfig to find a Zstandard installation. +
676 [small]#_[contributed by Rosen Penev]_#
678 - Removed usage of the deprecated `codecvt` header. +
679 [small]#_[contributed by Orgad Shaneh]_#
681 - Added headers to CMake project files. +
682 [small]#_[contributed by Orgad Shaneh]_#
685 === Test improvements
687 - Made the integration tests work on Windows. +
688 [small]#_[contributed by Orgad Shaneh and R. Voggenauer]_#
690 - Improved diagnostics from the "`Version output readable`" test. +
691 [small]#_[contributed by Orgad Shaneh]_#
693 - Made setting the `KEEP_TESTDIR` variable actually work. +
694 [small]#_[contributed by Louis Caron]_#
696 - Fixed a typo in depend mode tests. +
697 [small]#_[contributed by Louis Caron]_#
699 - Added more depend mode tests. +
700 [small]#_[contributed by Louis Caron]_#
703 === Documentation improvements
706 https://github.com/ccache/ccache/blob/v4.7/doc/INSTALL.md[installation
708 [small]#_[contributed by Rafael Kitover]_#
710 - Fixed a typo in the help text. +
711 [small]#_[contributed by Joel Rosdahl]_#
716 Release date: 2022-08-27
721 - Fixed MSVC support (regression in ccache 4.6.2). +
722 [small]#_[contributed by Joel Rosdahl]_#
724 - Fixed detection of PCH header for concatenated `-include` option (e.g.,
725 `-includepch.h` instead of `-include pch.h`). +
726 [small]#_[contributed by Joel Rosdahl]_#
729 === Build improvements
731 - Fixed build with musl when using GCC 12. +
732 [small]#_[contributed by Khem Raj]_#
735 === Test improvements
737 - Disabled the "`Failure to write output file`" test when running on a
738 filesystem that doesn't support read-only directories. +
739 [small]#_[contributed by Joel Rosdahl]_#
744 Release date: 2022-08-22
749 - Fixed a race condition that could lead to a crash if a file in the cache is
750 removed with unlucky timing, e.g. by another ccache process doing cache
752 [small]#_[contributed by Joel Rosdahl]_#
754 - Dependency file rewriting will now always be performed if
755 `base_dir`/`CCACHE_BASEDIR` is active. This fixes a problem with the
756 dependency file content when Clang is used with `-fsanitize=address`. +
757 [small]#_[contributed by Joel Rosdahl]_#
759 - Fixed handling of error condition for `--hash-file`/`--checksum-file`. +
760 [small]#_[contributed by Joel Rosdahl]_#
762 - Made sure to enable the inode cache only if subsecond `stat` timestamps are
764 [small]#_[contributed by Joel Rosdahl]_#
766 - Added a work-around for a Clang bug when writing to a full NFS file system. +
767 [small]#_[contributed by Joel Rosdahl]_#
769 - Made failure writing to the output file increment the "`bad output file`"
770 counter instead of "`cache miss`". +
771 [small]#_[contributed by Joel Rosdahl]_#
773 - Fixed false positive cache hits for code constructions similar to
774 `__asm__(".incbin" " \"file\"")`. +
775 [small]#_[contributed by Joel Rosdahl]_#
777 - Fixed false success for `-fcolor-diagnostics` probe with GCC. A side effect of
778 this is that a compiler type that ccache can't identify from the compiler name
779 (such as `/usr/bin/cc` where `cc` is not a symlink) from now on won't produce
780 color diagnostics when used via ccache even if the compiler actually is GCC or
782 [small]#_[contributed by Joel Rosdahl]_#
784 - More cases of invalid secondary storage URLs are now handled gracefully. +
785 [small]#_[contributed by Joel Rosdahl]_#
787 - Fixed the display of maximum cache size in `ccache -s` if it's 0 (=
789 [small]#_[contributed by Joel Rosdahl]_#
791 - Removed AsciiDoc markup from help text of `--trim-dir`. +
792 [small]#_[contributed by Joel Rosdahl]_#
794 - The temporary directory is now cleaned up properly even if it's left
796 [small]#_[contributed by Joel Rosdahl]_#
798 - Made cleanup of the temporary directory not rely a directory timestamp. +
799 [small]#_[contributed by Joel Rosdahl]_#
801 - Made sure to retain mtime/atime when recompressing cache files with
802 `-X`/`--recompress`. +
803 [small]#_[contributed by Joel Rosdahl]_#
805 - The correct umask is now used when populating the primary cache from a
807 [small]#_[contributed by Joel Rosdahl]_#
809 - Fixed creation of temporary files on file systems that don't support hard
810 links (such as FAT32). +
811 [small]#_[contributed by Joel Rosdahl]_#
813 - Added knowledge about `-Wa,...=file` so that ccache then falls back to running
815 [small]#_[contributed by Joel Rosdahl]_#
817 - Corrected handling of space in paths when using response file on Windows. +
818 [small]#_[contributed by Sergey Semushin]_#
820 - Fixed crash due to empty include filename in preprocessor output generated by
822 [small]#_[contributed by Oleg Sidorkin]_#
825 === Build improvements
827 - Fixed build problems with a development version of GCC 13. +
828 [small]#_[contributed by Joel Rosdahl]_#
830 - Fixed build problems with MSVC. +
831 [small]#_[contributed by Florin Trofin]_#
834 === Test improvements
836 - Clang warnings from the "`-fdebug-prefix-map`" test are now suppressed. +
837 [small]#_[contributed by Joel Rosdahl]_#
839 - Made sure to only run the "`-ftest-coverage + -fprofile-dir`" test with GCC. +
840 [small]#_[contributed by Joel Rosdahl]_#
842 - Fixed printing of error messages with embedded newlines. +
843 [small]#_[contributed by Joel Rosdahl]_#
845 - Fixed warning when running the "`inode_cache`" test in isolation. +
846 [small]#_[contributed by Joel Rosdahl]_#
848 - Fixed test failure when the compiler used for testing is an old ccache version
849 masquerading as the compiler. +
850 [small]#_[contributed by Joel Rosdahl]_#
853 === Documentation improvements
855 - Mentioned that mtime is used for LRU cleanup. +
856 [small]#_[contributed by Joel Rosdahl]_#
861 Release date: 2022-05-15
866 - Added support for passing a directory to the MSVC `/Fo` option. +
867 [small]#_[contributed by Orgad Shaneh]_#
869 - Added knowledge about the `-imsvc` compiler option. +
870 [small]#_[contributed by Jacob Young]_#
872 - Added knowledge about the `-z` linker option. +
873 [small]#_[contributed by Joel Rosdahl]_#
878 - Improved handling of `.gcno` files in combination with absolute input file
880 [small]#_[contributed by Joel Rosdahl]_#
882 - Adapted to changes in GCC 9+ `.gcno` files, which contain the current working
883 directory, by including said directory in the hash. You can opt out of this by
884 enabling "`gcno_cwd sloppiness`". +
885 [small]#_[contributed by Joel Rosdahl]_#
887 - A preexisting object file is no longer considered when using
889 [small]#_[contributed by Joel Rosdahl]_#
891 - Authenticate with Redis before database selection. +
892 [small]#_[contributed by an anonymous user]_#
894 - Don't exit with an error on failure reading a cached file. +
895 [small]#_[contributed by an anonymous user]_#
897 - Bail out on too hard MSVC environment variables `CL` and `+_CL_+`. +
898 [small]#_[contributed by Joel Rosdahl]_#
900 - Only use `/run/user/<UID>/ccache-tmp` as the temporary directory if it's
902 [small]#_[contributed by Joel Rosdahl]_#
904 - Fixed handling of the final newline in cached standard output from the
906 [small]#_[contributed by Orgad Shaneh]_#
908 - Fixed a bug related to distcc markers in standard error output. +
909 [small]#_[contributed by Joel Rosdahl]_#
911 - Paths to `base_dir` are now properly normalized on Windows. +
912 [small]#_[contributed by Vili Väinölä and Joel Rosdahl]_#
914 - Fixed handling of MSVC `/Fp` and `/Yu` options with concatenated path. +
915 [small]#_[contributed by Joel Rosdahl]_#
917 - Fixed "`Multiple precompiled headers used`" error if MSVC `/Yu` option is used
919 [small]#_[contributed by Alexey Telishev]_#
921 - Check for short reads when reading strings in result/manifest files. +
922 [small]#_[contributed by Gregor Jasny]_#
924 - Log expanded secondary storage URL in put/remove. +
925 [small]#_[contributed by Joel Rosdahl]_#
927 - Fixed logging of statistics counters with value higher than one in debug log
929 [small]#_[contributed by Joel Rosdahl]_#
931 - Avoid incorrect error log message for Redis write operations in `reshare`
933 [small]#_[contributed by Joel Rosdahl]_#
935 - Support Redis URL without host (meaning localhost). +
936 [small]#_[contributed by Joel Rosdahl]_#
939 === Build improvements
941 - Prefer CMake find module for hiredis and zstd packages. +
942 [small]#_[contributed by Cristian Adam and Joel Rosdahl]_#
944 - Fixed building and linking BLAKE3 with MSVC. +
945 [small]#_[contributed by Rafael Kitover]_#
947 - Fixed static linkage with hiredis on Windows. +
948 [small]#_[contributed by Orgad Shaneh]_#
950 - Fixed miscompile of nonstd::expected on MSVC v19.22. +
951 [small]#_[contributed by Jacob Young]_#
953 - Fixed build arguments to clang-cl. +
954 [small]#_[contributed by Jacob Young]_#
956 - Fixed parsing of MSVC response files. +
957 [small]#_[contributed by Jacob Young]_#
959 - Support Git 1.x when determining ccache version. +
960 [small]#_[contributed by Joel Rosdahl]_#
963 === Test improvements
965 - Worked around an endianness problem which affected builds and tests on
966 big-endian systems. +
967 [small]#_[contributed by Joel Rosdahl]_#
969 - A C++-capable compiler is no longer required for the test suite. +
970 [small]#_[contributed by Joel Rosdahl]_#
972 - Fixed an issue with inode cache tests, leading to sporadic failures in the
973 inode test suite when running many parallel tests. +
974 [small]#_[contributed by Joel Rosdahl]_#
976 - Fixed sporadic failures in the profiling test suite. +
977 [small]#_[contributed by Jacob Young]_#
980 === Documentation improvements
982 - Added reference to example build configs in installation instructions. +
983 [small]#_[contributed by an anonymous user]_#
985 - Default cache locations are now mentioned for Windows and macOS as well. +
986 [small]#_[contributed by Joel Rosdahl]_#
988 - Added a warning about usage of `base_dir`. +
989 [small]#_[contributed by Joel Rosdahl]_#
994 Release date: 2022-02-27
999 - Added support for caching calls to Microsoft Visual C++ (MSVC) and clang-cl
1000 (MSVC compatibility for Clang). +
1001 [small]#_[contributed by Cristian Adam, Luboš Luňák, Orgad Shaneh and Joel
1004 - Added an option to use a bearer token with the HTTP backend. This makes it
1005 possible to use e.g. Google Cloud Storage as a secondary storage backend. +
1006 [small]#_[contributed by an anonymous user]_#
1008 - Added support for caching standard output from the compiler. +
1009 [small]#_[contributed by Luboš Luňák and Joel Rosdahl]_#
1011 - Added a new `--inspect` option for debugging cache entries, replacing the
1012 previous `--dump-manifest` and `--dump-result` options. +
1013 [small]#_[contributed by Joel Rosdahl]_#
1015 - Enabled HTTP keep-alive by default. +
1016 [small]#_[contributed by Joel Rosdahl]_#
1021 - Fixed copying of binary files on Windows. +
1022 [small]#_[contributed by R. Voggenauer]_#
1024 - Improved detection of the `.incbin` assembler directive to reduce false
1026 [small]#_[contributed by Alexey Sheplyakov]_#
1028 - Ccache now verifies that `/run/user/<UID>/ccache-tmp` is writable before using
1029 it for temporary files. +
1030 [small]#_[contributed by Joel Rosdahl]_#
1032 - Fixed statistics output for secondary storage. +
1033 [small]#_[contributed by Orgad Shaneh]_#
1035 - Fixed a problem when copying a cache entry from secondary storage into an
1036 empty primary storage. +
1037 [small]#_[contributed by Joel Rosdahl]_#
1039 - Visual Studio .rsp files with UTF-16LE encoding are now handled correctly. +
1040 [small]#_[contributed by Vili Väinölä]_#
1042 - Made conversion to relative paths more reliable on Windows. +
1043 [small]#_[contributed by Marius Zwicker]_#
1045 - The process umask is now respected when making hard linked files read only. +
1046 [small]#_[contributed by Joel Rosdahl]_#
1048 - A forced recache is no longer considered a "`direct cache miss`". +
1049 [small]#_[contributed by Joel Rosdahl]_#
1052 === Documentation improvements
1054 - Corrected reference to the `debug_dir` option. +
1055 [small]#_[contributed by Joel Rosdahl]_#
1057 - Improved documentation of `--config-path`. +
1058 [small]#_[contributed by Joel Rosdahl]_#
1060 - Added documentation that compiler plugins are hashed too. +
1061 [small]#_[contributed by Philipp Gortan]_#
1064 === Test improvements
1066 - The "`trim_dir`" test suite is now only run when cleanup tests are enabled. +
1067 [small]#_[contributed by Joel Rosdahl]_#
1072 Release date: 2021-11-17
1077 - Fixed entry_size field for result entries. This bug affected the recompression
1078 feature (`-X`/`--recompress`) in ccache 4.5. +
1079 [small]#_[contributed by Joel Rosdahl]_#
1081 - The actual compression level is now once again stored in the cache entry
1083 [small]#_[contributed by Joel Rosdahl]_#
1085 - Corrected error handling for non-constructible secondary storage backends. For
1086 instance, this avoids a crash when a Redis server can't be reached. +
1087 [small]#_[contributed by Joel Rosdahl]_#
1092 Release date: 2021-11-13
1097 - Made various improvements to the cache entry format. Among other things, the
1098 header now contains a creation timestamp and a note of the ccache version used
1099 to create the entry. The cache entry checksum has also been upgraded to use
1100 128-bit XXH3 instead 64-bit XXH3. +
1101 [small]#_[contributed by Joel Rosdahl]_#
1103 - Added support for cache namespaces. If a namespace configured, e.g. using
1104 `CCACHE_NAMESPACE=some_string`, the namespace string will be added to the
1105 hashed data for each compilation. This will make the associated cache entries
1106 logically separate from cache entries in other namespaces, but they will still
1107 share the same storage space. Cache entries can also be selectively removed
1108 from the primary cache with the new command line option `--evict-namespace`,
1109 potentially in combination with `--evict-older-than`. +
1110 [small]#_[contributed by Joel Rosdahl]_#
1112 - Made HTTP keep-alive configurable, defaulting to off for now. +
1113 [small]#_[contributed by Gregor Jasny]_#
1115 - Added support for rewriting absolute path to Clang option `--gcc-toolchain`. +
1116 [small]#_[contributed by Joel Rosdahl]_#
1119 === Compatibility notes
1121 - A consequence of the changed cache entry format is that ccache 4.5 will not
1122 share cache entries with earlier versions. Different ccache versions can
1123 however still use the same cache storage without any issues.
1128 - Fixed a problem with special characters in the user info part of URLs for HTTP
1130 [small]#_[contributed by Russell McClellan]_#
1132 - Fixed win32 log messages about file locks. +
1133 [small]#_[contributed by Luboš Luňák]_#
1135 - Fixed debug directory handling on Windows. +
1136 [small]#_[contributed by Luboš Luňák]_#
1138 - The hard link and file clone features are now disabled when secondary storage
1139 is used since they only work for the local primary cache. +
1140 [small]#_[contributed by Joel Rosdahl]_#
1145 Release date: 2021-09-28
1150 - Fixed a bug introduced in 4.4 where ccache could produce false direct cache
1151 hits in some situations if it decides to disable the direct mode temporarily
1152 (e.g. due to "`too new header`" file). +
1153 [small]#_[contributed by Joel Rosdahl]_#
1156 === Test improvements
1158 - Use shell builtin pwd command for basedir test. +
1159 [small]#_[contributed by Kira Bruneau]_#
1161 - Cope with CC being a wrapper script that uses ccache. +
1162 [small]#_[contributed by Joel Rosdahl]_#
1167 Release date: 2021-09-11
1172 - The secondary storage statistics section of `-s/--show-stats` is now shown
1173 only if it's non-empty or with two verbose options. +
1174 [small]#_[contributed by Joel Rosdahl]_#
1176 - Added display of statistics counters for misses. Previously they were only
1177 implicit in the "`hits + misses`" sums. +
1178 [small]#_[contributed by Joel Rosdahl]_#
1183 - Fixed spurious crashes when using the HTTP or Redis backend and the remote
1184 connection hung up. +
1185 [small]#_[contributed by Joel Rosdahl]_#
1187 - Made sure to always store configuration origin value. +
1188 [small]#_[contributed by Gregor Jasny]_#
1191 === Build improvements
1193 - The matching version of lld is now used for Clang. +
1194 [small]#_[contributed by Gregor Jasny]_#
1196 - The standard linker is now used if IPO (LTO) is enabled. +
1197 [small]#_[contributed by Gregor Jasny]_#
1199 - Disabled IPO (LTO) for MinGW toolchains since they seem to be generally
1201 [small]#_[contributed by Gregor Jasny]_#
1203 - Fixed build errors with Clang on Windows. +
1204 [small]#_[contributed by Orgad Shaneh]_#
1207 === Test improvements
1209 - Fixed .incbin test with newer binutil versions. +
1210 [small]#_[contributed by Joel Rosdahl]_#
1212 - Fixed basedir test suite failure when using a symlinked CWD. +
1213 [small]#_[contributed by Joel Rosdahl]_#
1215 - Improved output of differing text files on failure. +
1216 [small]#_[contributed by Joel Rosdahl]_#
1221 Release date: 2021-08-19
1226 - Made it possible to share a cache over network or on a local filesystem. The
1227 configuration option `secondary_storage`/`CCACHE_SECONDARY_STORAGE` specifies
1228 one or several storage backends to query after the primary local cache
1229 storage. It is also possible to configure sharding (partitioning) of the cache
1230 to spread it over a server cluster using
1231 https://en.wikipedia.org/wiki/Rendezvous_hashing[Rendezvous hashing]. See the
1232 _https://ccache.dev/manual/4.4.html#_secondary_storage_backends[Secondary
1233 storage backends]_ chapter in the manual for details. +
1234 [small]#_[contributed by Joel Rosdahl]_#
1236 - Added an HTTP backend for secondary storage on any HTTP server that supports
1237 GET/PUT/DELETE methods. See https://ccache.dev/howto/http-storage.html[How to
1238 set up HTTP storage] for hints on how to set up an HTTP server for use with
1240 [small]#_[contributed by Gregor Jasny]_#
1242 - Added a Redis backend for secondary storage on any server that supports the
1243 Redis protocol. See https://ccache.dev/howto/redis-storage.html[How to set up
1244 Redis storage] for hints on how to set up a Redis server for use with
1246 [small]#_[contributed by Anders F Björklund]_#
1248 - Added a filesystem backend for secondary storage. It can for instance be used
1249 for a shared cache over networked filesystems such as NFS, or for mounting a
1250 secondary read-only cache layer into a build container. +
1251 [small]#_[contributed by Joel Rosdahl]_#
1253 - Added `--trim-dir`, `--trim-max-size` and `--trim-method` options that can be
1254 used to trim a secondary storage directory to a certain size, e.g. via
1256 [small]#_[contributed by Joel Rosdahl]_#
1258 - Added a configuration option `reshare`/`CCACHE_RESHARE` which makes ccache
1259 send results to secondary storage even for primary storage cache hits. +
1260 [small]#_[contributed by Joel Rosdahl]_#
1262 - Added new statistics counters for direct/preprocessed cache misses, primary
1263 storage hits/misses, secondary storage hits/misses/errors/timeouts and forced
1265 [small]#_[contributed by Joel Rosdahl]_#
1267 - Improved statistics summary. The `-s`/`--show-stats` option now prints a more
1268 condensed overview where the counters representing "`uncacheable calls`" are
1269 summed as uncacheable and errors counters. The summary shows hit rate for
1270 direct/preprocessed hits/misses, as well as primary/secondary storage
1271 hits/misses. More details are shown with `-v`/`--verbose`. Note: Scripts
1272 should use `--print-stats` (available since ccache 3.7) instead of trying to
1273 parse the output of `--show-stats`. +
1274 [small]#_[contributed by Joel Rosdahl]_#
1276 - Added a "`stats log`" feature (configuration option
1277 `stats_log`/`CCACHE_STATSLOG`), which tells ccache to store statistics in a
1278 separate log file specified by the user. It can for instance be used to
1279 collect statistics for a single build without interference from other
1280 concurrent builds. Statistics from the log file can then be viewed with
1281 `ccache --show-log-stats`. +
1282 [small]#_[contributed by Anders F Björklund]_#
1284 - Added support for clang's `--config` option. +
1285 [small]#_[contributed by Tom Stellard]_#
1287 - Added support for one `-Xarch_*` option that matches a corresponding `-arch`
1289 [small]#_[contributed by Joel Rosdahl]_#
1291 - Renamed the `--directory` option to `--dir` for consistency with other
1293 [small]#_[contributed by Joel Rosdahl]_#
1295 - Made the `--config-path` and `--dir` options affect the whole command line so
1296 that they don't have to be put before `-s`/`--show-stats`. +
1297 [small]#_[contributed by Joel Rosdahl]_#
1299 - Made `--dump-manifest` and `--dump-result` accept filename `-` for reading
1300 from standard input. +
1301 [small]#_[contributed by Anders F Björklund]_#
1303 - Made the output of `--print-stats` sorted. +
1304 [small]#_[contributed by Joel Rosdahl]_#
1306 - Added more internal trace points. +
1307 [small]#_[contributed by Joel Rosdahl]_#
1312 - Fixed a crash if using `base_dir` and `$PWD` is set to a relative path. +
1313 [small]#_[contributed by Joel Rosdahl]_#
1315 - Fixed a bug with `-fprofile-generate` where ccache could give false positive
1316 cache hits when compiling with relative paths in another directory. +
1317 [small]#_[contributed by Joel Rosdahl]_#
1319 - Fixed a bug in `debug_dir`/`CCACHE_DEBUGDIR`. The absolute path to the object
1320 file was not created correctly if the object file didn't already exist. +
1321 [small]#_[contributed by Joel Rosdahl]_#
1323 - Disabled preprocessor hits for pre-compiled headers with Clang again. +
1324 [small]#_[contributed by Arne Hasselbring]_#
1326 - Fixed a problem when using the Gold linker on MIPS by only probing for a
1327 faster linker in dev build mode and on x86_64. +
1328 [small]#_[contributed by Joel Rosdahl]_#
1330 - Made the `-DENABLE_TRACING=1` mode work again. +
1331 [small]#_[contributed by Anders F Björklund]_#
1336 - A C++14 compiler or newer is now required to build ccache. For GCC, this means
1337 version 6 or newer in practice.
1339 - CMake 3.10 or newer is now required to build ccache.
1341 - https://asciidoctor.org[Asciidoctor] is now required to build ccache
1345 === Build/test/documentation improvements
1347 - Fixed an issue in the modules test suite that showed up when running the
1348 ccache test suite with the clang wrapper provided by Nixpkgs. +
1349 [small]#_[contributed by Ryan Burns]_#
1351 - Made the nvcc_ldir test suite require a working NVCC. +
1352 [small]#_[contributed by Michael Kruse]_#
1354 - Made the ivfsoverlay test suite more robust. +
1355 [small]#_[contributed by Michael Kruse]_#
1357 - Fixed issue with usage of `/FI` when building ccache with MSVC. +
1358 [small]#_[contributed by Michael Kruse]_#
1360 - Fixed Apple Clang detection in the integration test suite. +
1361 [small]#_[contributed by Gregor Jasny]_#
1363 - Made clang the default compiler when running the test suite on macOS. +
1364 [small]#_[contributed by Gregor Jasny]_#
1366 - Silenced stray printout from "-P -c" test case. +
1367 [small]#_[contributed by Joel Rosdahl]_#
1369 - Fixed selection of the ccache binary to use when running the test suite with
1370 multi-config generators like Xcode. +
1371 [small]#_[contributed by Gregor Jasny]_#
1373 - Fixed CMake feature detection for `ctim`/`mtim` fields in `struct stat`. +
1374 [small]#_[contributed by Gregor Jasny]_#
1376 - Fixed issue with not linking to .lib correctly on Windows. +
1377 [small]#_[contributed by R. Voggenauer]_#
1379 - Made it possible to override `CCACHE_DEV_MODE` on the command line. +
1380 [small]#_[contributed by Joel Rosdahl]_#
1382 - Improved HTML documentation style. +
1383 [small]#_[contributed by Joel Rosdahl with minor fixes by Orgad Shaneh]_#
1388 Release date: 2021-05-09
1393 - Ccache now ignores the Clang compiler option `-ivfsoverlay` and its argument
1394 if you opt in to "`ivfsoverlay sloppiness`". This is useful if you use Xcode,
1395 which uses a virtual file system (VFS) for things like combining Objective-C
1398 - When using `-P` in combination with `-E`, ccache now reports this as "`called
1399 for preprocessing`" instead of "`unsupported compiler option`".
1401 - Added support for `-specs file.specs` and `--specs file.specs` without an
1402 equal sign between the arguments.
1407 - "`Split dwarf`" code paths are now disabled when outputting to `/dev/null`. This
1408 avoids an attempt to delete `/dev/null.dwo`.
1410 - Made the `stat`/`lstat` wrapper function for Windows treat pending deletes as
1413 - Fixed a bug that made ccache process header files redundantly for some
1414 relative headers when using Clang.
1416 - The object path is now included in the input hash when using `-fprofile-arcs`
1417 (or `--coverage`) since the object file embeds a `.gcda` path based on the
1421 === Build improvements
1423 - Added an `ENABLE_DOCUMENTATION` build option (default: true) that can be used
1424 to disable the build of documentation.
1426 - Fixed detection of pthread features.
1428 - Quote CMake variables expansions to avoid errors when
1429 `${CMAKE_C_FLAGS_RELWITHDEBINFO}` or `${CMAKE_CXX_FLAGS_RELWITHDEBINFO}`
1430 expands to the empty string.
1435 Release date: 2021-03-27
1440 - Ccache now only duplicates the stderr file descriptor into `$UNCACHED_ERR_FD`
1441 for calls to the preprocessor/compiler. This works around a complex bug in
1442 interaction with GNU Make, LTO linking and the Linux PTY driver.
1444 - Fixed detection of color diagnostics usage when using `-Xclang
1445 -fcolor-diagnostics` options.
1447 - The `-frecord-gcc-switches` compiler option is now handled correctly to avoid
1448 false positive cache hits.
1450 - Made it possible for per-compilation debug log files to be written in most
1451 argument processing error scenarios. Previously, ccache would only write debug
1452 log files if the argument processing phase was successful.
1454 - Made ccache bail out on too hard Clang option `-gen-cdb-fragment-path`.
1456 - The `run_second_cpp` made is now enforced on macOS if `-g` is used since newer
1457 Clang versions on macOS produce different debug information when compiling
1460 - Made ccache only reject `-f(no-)color-diagnostics` for a known GCC compiler.
1461 This fixes a problem when using said option with Clang on macOS.
1463 - Implemented a better `stat`/`lstat` wrapper function for Windows.
1465 - Fixed a bug where ccache could return stale cache results on Windows.
1467 - Fixed handling of long command lines on Windows.
1470 === Portability and build improvements
1472 - Build configuration scripts now probe for atomic increment as well. This fixes
1473 a linking error on Sparc.
1475 - An existing CMake log message level is now used when warning about not finding
1478 - Added support for building ccache with xlclang++ on AIX 7.2.
1480 - Fixed assertion in the "`Debug option`" test.
1482 - Made build configuration skip using ccache when building with MSVC.
1484 - Upgraded to doctest 2.4.6. This fixes a build error with glibc >= 2.34.
1489 - Fixed markup of `compiler_type` value `other`.
1491 - Fixed markup of `debug_dir` documentation.
1493 - Fixed references to the `extra_files_to_hash` configuration option.
1498 Release date: 2021-02-02
1503 - Improved calculation of relative paths when using `base_dir` to also consider
1504 canonical paths (i.e. paths with dereferenced symlinks) as candidates.
1506 - Added a `debug_dir` (`CCACHE_DEBUGDIR`) configuration setting for specifying a
1507 directory for files written in debug mode.
1509 - Added support for compiler option `-x cuda`, understood by Clang.
1511 - The value of the `SOURCE_DATE_EPOCH` variable is now only hashed if it
1512 potentially affects the output from ccache. This means that ccache now (like
1513 before version 4.0) will be able to produce cache hits for source code that
1514 doesn't contain `+__DATE__+` or `+__TIME__+` macros regardless of the value of
1515 `SOURCE_DATE_EPOCH`.
1520 - Fixed a bug where a non-Clang compiler would silently accept the
1521 Clang-specific `-f(no-)color-diagnostics` option when run via ccache. This
1522 confused feature detection made by e.g. CMake.
1524 - Improved creation of temporary files on Windows. Previously, ccache would in
1525 practice reuse temporary filenames on said platform resulting in various
1526 problems with parallel builds.
1528 - Fixed creation of parent directories when creating a lock file on Windows.
1530 - Fixed a race condition related to removal of temporary files.
1532 - Improved calculation of directory name for a Windows-style path.
1534 - A compilation result is now not stored in the cache if an included
1535 preprocessed header file is too new. This fixes a bug where the content of a
1536 newly created preprocessed header file could be missing from the hash,
1537 resulting in a false positive cache hit.
1539 - Fixed calculation of the split DWARF filename for an object filename with zero
1542 - Fixed retrieval of the object file the destination is `/dev/null`.
1545 === Portability and build improvements
1547 - Additional compiler flags like `-Wextra -Werror` are now only added when
1548 building ccache in developer mode.
1550 - The developer build mode no longer enables `-Weverything` for Clang.
1552 - `_XOPEN_SOURCE` is now defined appropriately on FreeBSD to fix missing
1553 declaration of `isascii`.
1555 - Improved detection of buildability of BLAKE3 assembler files.
1557 - Disabled build of inode cache code on OSes without
1558 `pthread_mutexattr_setpshared`, such as OpenBSD.
1560 - Made static linking the default for a Windows MinGW build.
1562 - Removed legacy fallback replacements of `mkstemp` and `realpath`.
1564 - Improved detection of SSE/AVX support.
1566 - Improved detection of support for the AVX2 target attribute.
1568 - Configuration scripts now try to detect and enable BLAKE3's Neon support.
1570 - Made it possible to run the integration test suite on macOS.
1572 - Fixed building of 32-bit unit tests on macOS.
1574 - Made it possible to compile ccache for C++17.
1576 - Fixed printing of 64-bit `time_t` on 32-bit architectures like RISCV32.
1578 - Made sure to only use ASCII characters in the manual's AsciiDoc source code to
1579 make it possible to generate documentation in non-UTF8 locales.
1581 - Upgraded to optional-lite 3.4.0, fmt 7.1.3, doctest 2.4.4 and zstd 1.4.8.
1583 - Took steps towards being able to run the test suite on Windows.
1588 - Improved wording of `compiler_check` string values.
1590 - Improved documentation of compression levels and the `-X/--recompress` option.
1592 - Improved consistency of terms in the manual.
1594 - HTML documentation is now built and installed by default if possible.
1596 - Fixed incorrect documentation of configuration option `cache_dir`.
1598 - Added hint on how to link statically with libzstd.
1600 - Mention that ccache requires the `-c` compiler option.
1605 Release date: 2020-11-22
1610 - Symlinks are now followed when guessing the compiler. This makes ccache able
1611 to guess compiler type "`GCC`" for a common symlink chain like this:
1612 `/usr/bin/cc` -> `/etc/alternatives/cc` -> `/usr/bin/gcc` -> `gcc-9` ->
1613 `x86_64-linux-gnu-gcc-9`.
1615 - Added a new `compiler_type` (`CCACHE_COMPILERTYPE`) configuration option that
1616 allows for overriding the guessed compiler type.
1618 - Added support for caching compilations with `-fsyntax-only`.
1620 - Added a command line option `--config-path`, which specifies the
1621 configuration file to operate on. It can be used instead of setting
1622 `CCACHE_CONFIGPATH` temporarily.
1627 - The original color diagnostics options are now retained when forcing colored
1628 output. This fixes a bug where feature detection of the `-fcolor-diagnostics`
1629 option would succeed when run via ccache even though the actual compiler
1630 doesn't support it (e.g. GCC <4.9).
1632 - Fixed a bug related to umask when using the `umask` (`CCACHE_UMASK`)
1633 configuration option.
1635 - Allow `ccache ccache compiler ...` (repeated `ccache`) again.
1637 - Fixed parsing of dependency file in the "`depend mode`" so that filenames with
1638 space or other special characters are handled correctly.
1640 - Fixed rewriting of the dependency file content when the object filename
1641 includes space or other special characters.
1643 - Fixed runtime detection of AVX2 support, not relying on the sometimes broken
1644 `__builtin_cpu_support` routine.
1646 - Added missing parameters to a log call, thus avoiding a crash when it is
1647 found out at runtime that file cloning is unsupported by the OS.
1650 === Portability and build fixes
1652 - The ccache binary is now linked with `libatomic` if needed. This fixes build
1653 problems with GCC on ARM and PowerPC.
1655 - Fixed build of BLAKE3 code with Clang 3.4 and 3.5.
1657 - Fixed "`use of undeclared identifier 'CLONE_NOOWNERCOPY'`" build error on
1660 - Fixed build problems related to missing AVX2 and AVX512 support on older
1663 - Fixed static linkage with libgcc and libstdc++ for MinGW and made it
1666 - Fixed conditional compilation of "`robust mutex`" code for the inode cache
1669 - Fixed badly named man page filename (`Ccache.1` instead of `ccache.1`).
1671 - Disabled some tests on ancient Clang versions.
1674 === Other improvements and fixes
1676 - The man page is now built by default if the required tools are available.
1678 - Use CMake `A2X_EXE` variable instead of hardcoded `a2x`.
1680 - Improved build errors when building ccache with very old compiler versions.
1682 - Fall back to version "`unknown`" when Git is not installed.
1684 - Documented the relationship between `CCACHE_DIR` and `-d/--directory`.
1686 - Fixed incorrect reference and bad markup in the manual.
1691 Release date: 2020-10-18
1694 === Summary of major changes
1696 - Changed the default cache directory location to follow the XDG base directory
1699 - Changed compression algorithm from Deflate (zlib) to Zstandard, enabled by
1702 - Added functionality for recompressing cache content with a higher compression
1705 - Changed hash algorithm from MD4 to BLAKE3.
1707 - Added checksumming with XXH3 to detect data corruption.
1709 - Improved cache directory structure.
1711 - Added support for using file cloning (AKA "`reflinks`").
1713 - Added an experimental "`inode cache`" for file hashes.
1716 === Compatibility notes
1718 - The default location of the cache directory has changed to follow the XDG
1719 base directory specification (<<Detailed functional changes,more details
1720 below>>). This means that scripts can no longer assume that the cache
1721 directory is `~/.ccache` by default. The `CCACHE_DIR` environment variable
1722 still overrides the default location just like before.
1724 - The cache directory structure has changed compared to previous versions
1725 (<<Detailed functional changes,more details below>>). This means that ccache
1726 4.0 will not share cache results with earlier versions. It is however safe to
1727 run ccache 4.0 and earlier versions against the same cache directory: cache
1728 bookkeeping, statistics and cleanup are backward compatible, with the minor
1729 exception that some statistics counters incremented by ccache 4.0 won't be
1730 visible when running `ccache -s` with an older version.
1735 - CMake is now used instead of Autoconf for configuration and building.
1737 - A C++11 compiler, a C99 compiler and CMake 3.4.3 or newer are now required to
1740 - Ccache can now be built using Microsoft Visual C++.
1743 === Detailed functional changes
1745 - All data of a cached result is now stored in a single file called "`result`"
1746 instead of up to seven files. This reduces inode usage and improves data
1749 - Added compression of result and manifest files using the
1750 http://zstd.net[Zstandard] algorithm. Compression is enabled by default with
1751 compression level 1. This makes ccache able to store more data in the cache.
1752 Previously compression using Deflate (zlib) was available but disabled by
1753 default. Files can be recompressed with another compression level later with
1754 the `-X/--recompress` option described further below.
1756 - Changed from MD4 to https://blake3.io[BLAKE3] for hashing input. This
1757 improves performance and reduces the risk of hash collisions.
1759 - Added checksumming of result and manifest files using the
1760 http://xxhash.com[XXH3] algorithm to detect data corruption.
1762 - Ccache now follows the
1763 https://specifications.freedesktop.org/basedir-spec/[XDG base directory
1764 specification]. This means that the default cache directory on Unix systems
1765 is `$XDG_CACHE_HOME/ccache` (with `~/.cache/ccache` as the fallback if
1766 `XDG_CACHE_HOME` is not set) and the configuration file is
1767 `$XDG_CONFIG_HOME/ccache/ccache.conf` (with `~/.config/ccache/ccache.conf` as
1768 the fallback). On macOS, the fallbacks are `~/Library/Caches/ccache` and
1769 `~/Library/Preferences/ccache/ccache.conf`. On Windows, the fallbacks are
1770 `%APPDATA%/ccache` and `%APPDATA%/ccache/ccache.conf`. Exception: If the
1771 legacy `~/.ccache` directory exists, that directory is used as the default
1772 cache location and the configuration file is `~/.ccache/ccache.conf`.
1774 - Cache statistics are now stored in files on cache level 2 to reduce lock
1775 contention when there are many parallel compilations.
1777 - An appropriate cache directory level structure is now chosen automatically.
1778 The `cache_dir_levels` (`CCACHE_NLEVELS`) configuration option has therefore
1781 - Added an experimental "`inode cache`" for file hashes, allowing computed hash
1782 values to be reused both within and between builds. The inode cache is off by
1783 default but can be enabled by setting `inode_cache` (`CCACHE_INODECACHE`) to
1786 - Added support for using file cloning (AKA "`reflinks`") on Btrfs, XFS and APFS
1787 to copy data to and from the cache very efficiently.
1789 - Two measures have been implemented to make the hard link mode safer:
1790 hard-linked files are made read-only and inadvertent content changes that
1791 affect file size are detected.
1793 - Added a command line option `-x/--show-compression` which shows statistics
1794 about cache compression.
1796 - Added a command line option `-X/--recompress` which recompresses the cache
1797 data with another compression level or makes it uncompressed. If you choose
1798 to disable compression by default, or choose to use a compression level with
1799 a low compression ratio, you can recompress the cache with a higher
1800 compression level after the build or at another time when there are more CPU
1801 cycles available, for instance every night. Only files that are currently
1802 compressed with a different level than the wanted level will be recompressed.
1804 - Added a command line option `--evict-older-than` which removes cache entries
1805 older than a certain age.
1807 - Added a command line option `-d/--directory` which specifies a cache
1808 directory to operate on. It can be used instead of setting `CCACHE_DIR`
1811 - A progress bar has been added to show the progress of time-consuming options
1812 like `-c/--cleanup`, `-C/--clear`, `--evict-older-than`,
1813 `-x/--show-compression` and `-X/--recompress`.
1815 - When supported by the CPU, a SIMD-friendly (using AVX2) algorithm is now used
1816 to scan input source code for `+__DATE__+`, `+__TIME__+` and `+__TIMESTAMP__+`
1817 macros. This can decrease the number of CPU cycles for a direct cache hit with
1818 up to 15% in some cases.
1820 - Some unnecessary `stat(2)` system calls are now avoided when verifying header
1823 - Compiler diagnostic messages are now always cached in color. Ccache then
1824 strips the color codes on the fly when requested explicitly by a command line
1825 option or when stderr does not refer to a TTY. This allows IDEs and terminals
1826 to share cached compilation results.
1828 - The configuration option `compiler` (`CCACHE_COMPILER`) now always takes
1829 effect if specified. Previously, the configuration option was only used when
1830 the compiler specified on the command line was looked up via `PATH` (i.e.,
1831 not when an absolute path was specified).
1833 - Added optional logging to syslog if `log_file` (`CCACHE_LOGFILE`) is set to
1836 - The compiler option `-fmodules` is now handled in the "`depend mode`". If
1837 "`depend mode`" is disabled the option is still considered too hard and ccache
1838 will fall back to running the compiler.
1840 - Ccache can now cache compilations with coverage notes (`.gcno` files)
1841 produced by GCC 9+ in combination with `-fprofile-dir=dir`.
1843 - `realpath(3)` is no longer used for normalization when computing relative
1844 paths. This makes it possible to get cache hits when the source or build
1845 directory is a symbolic link to an absolute path that includes unstable
1846 information like build IDs or timestamps.
1848 - Added an `ignore_options` (`CCACHE_IGNOREOPTIONS`) configuration option which
1849 makes it possible to exclude compiler options from the hash.
1851 - Added an `absolute_paths_in_stderr` (`CCACHE_ABSSTDERR`) configuration option
1852 which makes ccache rewrite absolute paths in compiler warnings and errors to
1855 - Improved handling of umask. The configured `umask` (`CCACHE_UMASK`) is now
1856 only applied to files and directories in the cache directory. Previously the
1857 umask was applied to all files produced by ccache and the executed compiler.
1859 - Ccache is now able to share cache entries for different object file names
1860 when using `-MD` or `-MMD`.
1862 - Clang's `-Xclang` (used by CMake for precompiled headers),
1863 `-fno-pch-timestamp`, `-emit-pch`, `-emit-pth` and `-include-pth` options are
1866 - Added support for the HIP ("`C++ Heterogeneous-Compute Interface for
1867 Portability`") language.
1869 - The manifest format now allows for header files larger than 4 GiB.
1871 - Made it possible to once again cache compilations with `+__DATE__+` in the
1874 - Added handling of the `+__TIMESTAMP__+` macro.
1876 - An absolute input source path is now rewritten to a relative path when using
1879 - `waitpid` system calls interrupted by a signal are now handled correctly.
1881 - Made handling of `.dwo` files and interaction between `-gsplit-dwarf` and
1882 other `-g*` options more robust.
1884 - The "`couldn't find compiler`" statistics counter is no longer incremented
1885 when ccache exits with a fatal error.
1887 - Failure to run a `compiler_check` command is no longer a fatal error.
1889 - Added command line options `--dump-result` and `--extract-result` for
1890 inspecting and extracting result files.
1892 - Added a command line option `--checksum-file` for debugging or evaluating the
1895 - Improved error message for `ccache -o=K=V` (trying to set a configuration
1898 - Made timestamps in statistics files Y2038-proof.
1900 - Removed code for populating a newly created configuration file with max cache
1901 size and max files values for cache directories created by ccache versions
1902 older than 3.2 (released 2014).
1904 - Removed knowledge about a top-level `stats` file created by ccache versions
1905 older than 3.1 (released 2010).
1908 === Other improvements
1910 - Improved help text and documentation of command line options.
1912 - Improved documentation of the `base_dir` configuration option.
1914 - Improved documentation of preprocessor and direct modes.
1916 - Added HTML anchors to configuration options in the manual so that it is
1917 possible link to a specific option.
1919 - Tweaked placement of "`(readonly)`" in output of `ccache -s`.
1921 - Improved visibility of color output from the test suite.
1923 - Fixed a problem when running the test suite with Clang without a libgcov
1926 - Fixed test suite problems on macOS.
1928 - Disabled hardlink tests on AFS since it lacks such support.
1930 - Disabled read-only tests on file systems that lack such support.
1935 Release date: 2020-10-01
1940 - Coverage files (`.gcno`) produced by GCC 9+ when using `-fprofile-dir=dir`
1941 are now handled gracefully by falling back to running the compiler.
1943 - Fixed writing to log file larger than 2 GiB when running ccache compiled in
1949 - Improved documentation about sharing a cache on NFS.
1951 - Fixed test case failures with old objdump versions.
1953 - Fixed test case failures with GCC 4.4.
1958 Release date: 2020-07-21
1963 - Added knowledge about `-fprofile-{correction,reorder-functions,values}`.
1965 - ccache now handles the Intel compiler option `-xCODE` (where `CODE` is a
1966 processor feature code) correctly.
1968 - Added support for NVCC's `-Werror` and `--Werror` options.
1973 - ccache's "`Directory is not hashed if using -gz[=zlib]`" tests are now skipped
1979 Release date: 2020-06-22
1984 - Improved handling of profiling options. ccache should now work correctly for
1985 profiling options like `-fprofile-{generate,use}[=path]` for GCC ≥ 9 and
1986 Clang as well as `-fauto-profile[=path]` and the Clang-specific
1987 `-fprofile-instr-{generate,use}[=path]` and `-fprofile-sample-{use,accurate}`
1990 - ccache now copies files directly from the cache to the destination file
1991 instead of via a temporary file. This avoids problems when using filenames
1992 long enough to be near the file system's filename max limit.
1994 - When the hard-link mode is enabled, ccache now only uses hard links for
1995 object files, not other files like dependency files. This is because
1996 compilers unlink object files before writing to them but they don't do that
1997 for dependency files, so the latter can become overwritten and therefore
1998 corrupted in the cache.
2000 - Fixed a glitch related to hard-link mode and an empty cache.
2002 - ccache now supports the ccache.conf file to be a symlink.
2004 - Temporary files are now deleted immediately on signals like SIGTERM and
2005 SIGINT instead of some time later in a cleanup phase.
2007 - Fixed a bug that affected ccache's `-o/--set-config` option for the
2008 `base_dir` and `cache_dir_levels` keys.
2013 Release date: 2020-03-29
2018 - Fixed replacing of /dev/null when building as root with hard link mode
2019 enabled and using `-o /dev/null`.
2021 - Removed incorrect assertion resulting in "`ccache: error: Internal error in
2022 format`" when using `-fdebug-prefix-map=X=` with X equal to `$PWD`.
2027 - Improved CUDA/NVCC support: Recognize `-dc` and `-x cu` options.
2029 - Improved name of temporary file used in NFS-safe unlink.
2034 Release date: 2020-03-16
2039 - Use `$PWD` instead of the real CWD (current working directory) when checking
2040 for CWD in preprocessed output. This fixes a problem when `$PWD` includes a
2041 symlink part and the user has set `hash_dir = false`.
2043 - Rewrote the Windows version of the lockfile routines. This should mitigate
2044 several problems with the old implementation.
2046 - If `localtime_r` fails the epoch time is now logged instead of garbage.
2051 - Improved error message when a boolean environment variable has an invalid
2054 - Improved the regression fix in ccache 3.7.5 related to not passing
2055 compilation-only options to the preprocessor.
2057 - ccache's PCH test suite now skips running the tests if it detects broken PCH
2060 - Fixed unit test failure on Windows.
2062 - Fixed "`stringop-truncation`" build warning on Windows.
2064 - Improved "`x_rename`" implementation on Windows.
2066 - Improved removal of temporary file when rewriting absolute paths to relative
2067 in the dependency file.
2069 - Clarified "`include_file_ctime sloppiness`" in the Performance section in the
2075 Release date: 2020-01-05
2080 - Fixed a bug related to object file location in the dependency file (if using
2081 `-MD` or `-MMD` but not `-MF` and the build directory is not the same as the
2082 source directory then the object file location in the `.d` file would become
2083 incorrect). This fixes regression in ccache 3.7.5 introduced by the bug fix
2084 related to EDG-based compilers. Note that this removes support for EDG-based
2085 compilers again. (A better fix for this is planned for ccache 4.0.)
2087 - Removed the unify mode since it has bugs and shortcomings that are non-trivial
2088 or impossible to fix: it doesn't work with the direct mode, it doesn't handle
2089 C++ raw strings correctly, it can give false cache hits for `.incbin`
2090 directives, it's turned off when using `-g` and it can make line numbers in
2091 warning messages and `__LINE__` macros incorrect.
2093 - mtime and ctime values are now stored in the manifest files only when
2094 sloppy_file_stat is set. This avoids adding superfluous manifest file entries
2095 on direct mode cache misses.
2097 - A "`Result:`" line is now always printed to the log.
2099 - The "`cache miss`" statistics counter will now be updated for read-only cache
2100 misses, making it consistent with the cache hit case.
2105 Release date: 2019-11-17
2110 - The opt-in "`file_macro sloppiness`" mode has been removed so that the input
2111 file path now is always included in the direct mode hash. This fixes a bug
2112 that could result in false cache hits in an edge case when "`file_macro
2113 sloppiness`" is enabled and several identical source files include a relative
2114 header file with the same name but in different directories.
2116 - Statistics files are no longer lost when the filesystem of the cache is full.
2118 - Bail out on too hard Clang option `-MJarg` (in addition to the previous
2119 bailout of `-MJ arg`).
2121 - Properly handle color diagnostics in the depend mode as well.
2126 Release date: 2019-10-22
2131 - Added support for `-MF=arg` (with an extra equal sign) as understood by
2132 EDG-based compilers.
2137 - Fixed a regression in 3.7.2 that could result in a warning message instead of
2138 an error in an edge case related to usage of "`-Werror`".
2140 - An implicit `-MQ` is now passed to the preprocessor only if the object file
2141 extension is non-standard. This will make it easier to use EDG-based
2142 compilers (e.g. GHS) which don't understand `-MQ`. (This is a bug fix of the
2143 corresponding improvement implemented in ccache 3.4.)
2145 - ccache now falls back to running the real compiler instead of failing fataly
2146 if an internal temporary file is missing after compilation.
2148 - Fixed a crash if localtime returns null pointer in localtime_r replacement.
2150 - Fixed header file dependency tracking when building ccache itself.
2152 - Fixed warning during configure in out-of-tree build in developer mode.
2157 Release date: 2019-09-12
2162 - Added support for the `-gz[=type]` compiler option (previously ccache would
2163 think that "`-gz`" alone would enable debug information, thus potentially
2164 including the current directory in the hash).
2166 - Added support for converting paths like "`/c/users/...`" into relative paths
2172 Release date: 2019-08-17
2177 - The cache size (which is counted in "`used disk blocks`") is now correct on
2178 filesystems that use more or less disk blocks than conventional filesystems,
2179 e.g. ecryptfs or btrfs/zfs with transparent compression. This also fixes a
2180 related problem with ccache's own test suite when run on such file systems.
2182 - Fixed a regression in 3.7.2 when using the compiler option "`-Werror`" and
2183 then "`-Wno-error`" later on the command line.
2188 Release date: 2019-07-19
2193 - The compiler option `-gdwarf*` no longer forces "`run_second_cpp = true`".
2195 - Added verification that the value passed to the `-o/--set-config` option is
2198 - Fixed detection of precompiled headers in the depend mode.
2200 - Bail out on too hard Clang option `-ftime-trace`.
2202 - ccache now updates the correct stats file when adding/updating manifest
2203 files. This bug previously made the file and size statistics counters
2204 incorrect over time.
2206 - Fixed warnings from Clang about unused arguments during preprocessing.
2208 - Unknown manifest versions are now handled gracefully in `--dump-manifest`.
2210 - Fixed `make check` with "`funny`" locales.
2215 - Added a hint about not running `autogen.sh` when building from a release
2218 - Mention that `xsltproc` is needed when building from the source repository.
2223 Release date: 2019-05-01
2228 - Fixed a problem when using the compiler option `-MF /dev/null`.
2230 - Long commandlines are now handled gracefully on Windows by using the `@file`
2231 syntax to avoid hitting the commandline size limit.
2233 - Fixed complaint from GCC 9's `-Werror=format-overflow` when compiling ccache
2239 Release date: 2019-04-23
2244 - Fixed crash when the debug mode is enabled and the output file is in a
2245 non-writable directory, e.g. when the output file is `/dev/null`.
2247 - Fixed an issue when printing very large log messages to the debug log.
2249 - Fixed bugs related to support for `-gsplit-dwarf`. Previously ccache could
2250 produce an incorrect link to the `.dwo` file in the `.o` file.
2252 - Compilations with /dev/null as the input file are now cached.
2254 - ccache has learned how to construct the object filename if no `-o` option is
2255 given and the source filename does not include a `.` or ends with a `.`.
2257 - Fixed a temporary file leak when the depend mode is enabled and the compiler
2258 produces standard error output.
2260 - Fixed a bug in the depend mode where a manifest hash only could be associated
2261 with one set of header dependencies.
2263 - Manifest files did not get marked as used on direct cache hits, so the LRU
2264 cache cleanup would incorrectly remove them eventually. This has been fixed.
2266 - The rewriting of absolute paths into relative paths in the dependency file
2267 has been enabled in the depend mode as well.
2269 - ccache now ignores unknown keys in configuration files for forward
2272 - Rearranged command-line options into sections in the help text.
2274 - Documented the previously undocumented `--dump-manifest` and `--hash-file`
2275 options (only useful for debugging ccache itself).
2277 - Added missing documentation for the command-line option `-k/--get-config`
2278 added in ccache 3.5.
2280 - Renamed the `--print-config` command to `--show-config`.
2282 - Added a new `--print-stats` command that prints statistics counters in
2283 machine-parsable (tab-separated) format.
2285 - ccache no longer creates a missing output directory, thus mimicking the
2286 compiler behavior for `-o out/obj.o` when `out` doesn't exist.
2288 - `-fdebug-prefix-map=ARG`, `-ffile-prefix-map=ARG` and `-fmacro-prefix-map=ARG`
2289 are now included in the hash, but only the part before "`ARG`". This fixes a
2290 bug where compiler feature detection of said flags would not work correctly
2293 - Bail out on too hard compiler option `-gtoggle`.
2295 - Bail out on too hard Clang options `--analyze` and `-analyze`.
2297 - Improved debug logging of file hashes in depend mode.
2299 - Improved handling of various `-g*` options. In particular, ccache now
2300 understands that `-g0` cancels out previous `-g* options`.
2302 - Worked around a problem with Automake related to `.d` files when using the
2305 - Added opt-in (at configure time) support for enabling trace logs for
2306 profiling ccache itself. See `doc/DEVELOPER.md` in the code tree for more
2309 - Removed support for Fortran 77 again. Some Fortran support was added in
2310 ccache 3.3, but the implementation did not work when Fortran modules are
2316 Release date: 2019-01-14
2321 - ccache now has an opt-in "`depend mode`". When enabled, ccache never executes
2322 the preprocessor, which results in much lower cache miss overhead at the
2323 expense of a lower potential cache hit rate. The depend mode is only possible
2324 to use when the compiler option `-MD` or `-MMD` is used.
2326 - Added support for GCC's `-ffile-prefix-map` option. The `-fmacro-prefix-map`
2327 option is now also skipped from the hash.
2329 - Added support for multiple `-fsanitize-blacklist` arguments.
2331 - ccache now includes the environment variables `LANG`, `LC_ALL`, `LC_CTYPE`
2332 and `LC_MESSAGES` in the hash since they may affect localization of compiler
2333 warning messages. Set sloppiness to `locale` to opt out of this.
2335 - Fixed a problem due to Clang overwriting the output file when compiling an
2338 - Clarified the manual to explain the reasoning behind the "`file_macro`"
2339 sloppiness setting in a better way.
2341 - ccache now handles several levels of nonexistent directories when rewriting
2342 absolute paths to relative.
2344 - A new sloppiness setting `clang_index_store` makes ccache skip the Clang
2345 compiler option `-index-store-path` and its argument when computing the
2346 manifest hash. This is useful if you use Xcode, which uses an index store
2347 path derived from the local project path. Note that the index store won't be
2348 updated correctly on cache hits if you enable this option.
2350 - Rename sloppiness `no_system_headers` to `system_headers` for consistency
2351 with other options. `no_system_headers` can still be used as an
2352 (undocumented) alias.
2354 - The GCC variables "`DEPENDENCIES_OUTPUT`" and "`SUNPRO_DEPENDENCIES`" are now
2355 supported correctly.
2357 - The algorithm that scans for `__DATE_` and `+__TIME__+` tokens in the hashed
2358 source code now doesn't produce false positives for tokens where `+__DATE__+`
2359 or `+__TIME__+` is a substring.
2364 Release date: 2019-01-02
2369 - Added missing getopt_long.c source file to release archive.
2371 - Fixed (harmless) compiler warnings when building ccache object files.
2373 - CFLAGS is no longer passed to the linker when linking ccache.
2375 - Improved development mode build flags.
2380 Release date: 2018-10-15
2385 - Added a boolean `debug` (`CCACHE_DEBUG`) configuration option. When enabled,
2386 ccache will create per-object debug files that are helpful e.g. when debugging
2387 unexpected cache misses. See also the new "`Cache debugging`" section in the
2390 - Renamed `CCACHE_CC` to `CCACHE_COMPILER` (keeping the former as a deprecated
2393 - Added a new command-line option `-k/--get-config` that prints the value of a
2396 - It is now possible to let ccache hash a precomputed checksum file instead of
2397 the full content of a precompiled header. This can save time for large
2398 precompiled headers. Note that the build system needs to keep the checksum
2399 file in sync with the precompiled header for this to work.
2401 - Improved performance substantially when using `hash_dir = false` on platforms
2402 like macOS where `getcwd()` is slow.
2404 - Added "`stats updated`" timestamp in `ccache -s` output. This can be useful if
2405 you wonder whether ccache actually was used for your last build.
2407 - Renamed "`stats zero time`" to "`stats zeroed`" and documented it. The counter
2408 is also now only present in `ccache -s` output when `ccache -z` actually has
2411 - The content of the `-fsanitize-blacklist` file is now included in the hash,
2412 so updates to the file will now correctly result in separate cache entries.
2414 - It's now possible to opt out of building and installing man pages when
2415 running `make install` in the source repository.
2417 - If the compiler type can't be detected (e.g. if it is named `cc`), use safer
2418 defaults that won't trip up Clang.
2420 - Made the ccache test suite work on FreeBSD.
2422 - Added `file_stat_matches_ctime` option to disable ctime check if
2423 `file_stat_matches` is enabled.
2425 - Made "`./configure --without-bundled-zlib`" do what's intended.
2430 Release date: 2018-09-02
2435 - Fixed a race condition when creating the initial config file in the cache
2438 - Bail out on too hard Clang option `-MJ`.
2440 - Bail out on too hard option `-save-temps=obj`.
2442 - Handle separate parameter to Clang option `-target` correctly.
2444 - Upgraded bundled zlib to version 1.2.11.
2449 Release date: 2018-03-25
2454 - The cleanup algorithm has been fixed to not misbehave when files are removed
2455 by another process while the cleanup process is running. Previously, too many
2456 files could be removed from the cache if multiple cleanup processes were
2457 triggered at the same time, in extreme cases trimming the cache to a much
2458 smaller size than the configured limits.
2460 - Correctly hash preprocessed headers located in a "`.gch directory`".
2461 Previously, ccache would not pick up changes to such precompiled headers,
2462 risking false positive cache hits.
2464 - Fixed build failure when using the bundled zlib sources.
2466 - ccache 3.3.5 added a workaround for not triggering Clang errors when a
2467 precompiled header's dependency has an updated timestamp (but identical
2468 content). That workaround is now only applied when the compiler is Clang.
2470 - Made it possible to perform out-of-source builds in dev mode again.
2475 Release date: 2018-02-11
2480 - Fixed printing of version number in `ccache --version`.
2485 Release date: 2018-02-11
2488 === New features and enhancements
2490 - The compiler option form `--sysroot arg` is now handled like the documented
2491 `--sysroot=arg` form.
2493 - Added support for caching `.su` files generated by GCC flag `-fstack-usage`.
2495 - ccache should now work with distcc's "`pump`" wrapper.
2497 - The optional unifier is no longer disabled when the direct mode is enabled.
2499 - Added support for NVCC compiler options `--compiler-bindir/-ccbin`,
2500 `--output-directory/-odir` and `--libdevice-directory/-ldir`.
2502 - Boolean environment variable settings no longer accept the following
2503 (case-insensitive) values: `0`, `false`, `disable` and `no`. All other values
2504 are accepted and taken to mean "`true`". This is to stop users from setting
2505 e.g. `CCACHE_DISABLE=0` and then expect the cache to be used.
2507 - Improved support for `run_second_cpp = false`: If combined with passing
2508 `-fdirectives-only` (GCC) or `frewrite-includes` (Clang) to the compiler,
2509 diagnostics warnings and similar will be correct.
2511 - An implicit `-MQ` is now passed to the preprocessor only if the object file
2512 extension is non-standard. This should make it easier to use EDG-based
2513 compilers (e.g. GHS) which don't understand `-MQ`.
2515 - ccache now treats an unreadable configuration file just like a missing
2518 - Documented more pitfalls with enabling `hard_link` (`CCACHE_HARDLINK`).
2520 - Documented caveats related to colored warnings from compilers.
2525 - File size and number counters are now updated correctly when files are
2526 overwritten in the cache, e.g. when using `CCACHE_RECACHE`.
2528 - `run_second_cpp` is now forced for NVCC.
2530 - Fixed how the NVCC options `-optf` and `-odir` are handled.
2535 Release date: 2018-01-28
2537 === New features and enhancements
2539 - Improved instructions on how to get cache hits between different working
2545 - Fixed regression in ccache 3.3.5 related to the `UNCACHED_ERR_FD` feature.
2550 Release date: 2018-01-13
2553 === New features and enhancements
2555 - Documented how automatic cache cleanup works.
2560 - Fixed a regression where the original order of debug options could be lost.
2561 This reverts the "`Improved parsing of `-g*` options`" feature in ccache 3.3.
2563 - Multiple `-fdebug-prefix-map` options should now be handled correctly.
2565 - Fixed matching of directories in the `ignore_headers_in_manifest`
2566 configuration option.
2568 - Fixed detection of missing argument to `-opt`/`--options-file`.
2570 - ccache now bails out when building a precompiled header if any of the
2571 corresponding header files has an updated timestamp. This fixes complaints
2574 - Fixed a bug related to erroneously storing a dependency file with absolute
2575 paths in the cache on a preprocessed hit.
2577 - `ccache -c/--cleanup` now works like documented: it just recalculates size
2578 counters and trims the cache to not exceed the max size and file number
2579 limits. Previously, the forced cleanup took "`limit_multiple`" into account,
2580 so that `ccache -c/--cleanup` by default would trim the cache to 80% of the
2583 - ccache no longer ignores linker arguments for Clang since Clang warns about
2586 - Plugged a couple of file descriptor leaks.
2588 - Fixed a bug where ccache would skip hashing the compiler argument following a
2589 `-fno-working-directory`, `-fworking-directory`, `-nostdinc`, `-nostdinc++`,
2590 `-remap` or `-trigraphs` option in preprocessor mode.
2595 Release date: 2017-02-17
2597 === New features and enhancements
2599 - Documented the different cache statistics counters.
2604 - Fixed a regression in ccache 3.3 related to potentially bad content of
2605 dependency files when compiling identical source code but with different
2606 source paths. This was only partially fixed in 3.3.2 and reverts the new
2607 "`Names of included files are no longer included in the hash of the compiler's
2608 preprocessed output`" feature in 3.3.
2610 - Corrected statistics counter for `-optf`/`--options-file` failure.
2612 - Fixed undefined behavior warnings in ccache found by `-fsanitize=undefined`.
2616 Release date: 2016-10-26
2621 - ccache now detects usage of `.incbin` assembler directives in the source code
2622 and avoids caching such compilations.
2627 Release date: 2016-09-28
2632 - Fixed a regression in ccache 3.3 related to potentially bad content of
2633 dependency files when compiling identical source code but with different
2636 - Fixed a regression in ccache 3.3.1: ccache could get confused when using the
2637 compiler option `-Wp,` to pass multiple options to the preprocessor,
2638 resulting in missing dependency files from direct mode cache hits.
2643 Release date: 2016-09-07
2648 - Fixed a problem in the "`multiple `-arch` options`" support introduced in 3.3.
2649 When using the direct mode (the default), different combinations of `-arch`
2650 options were not detected properly.
2652 - Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
2653 path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
2654 (`CCACHE_CPP2`) is enabled.
2659 Release date: 2016-08-27
2663 - A C99-compatible compiler is now required to build ccache.
2666 === New features and enhancements
2668 - The configuration option `run_second_cpp` (`CCACHE_CPP2`) now defaults to
2669 true. This improves ccache's out-of-the-box experience for compilers that
2670 can't compile their own preprocessed output with the same outcome as if they
2671 compiled the real source code directly, e.g. newer versions of GCC and Clang.
2673 - The configuration option `hash_dir` (`CCACHE_HASHDIR`) now defaults to true.
2675 - Added a new `ignore_headers_in_manifest` configuration option, which
2676 specifies headers that should be ignored in the direct mode.
2678 - Added a new `prefix_command_cpp` (`CCACHE_PREFIX_CPP`) configuration option,
2679 which specifies one or several prefixes to add to the command line ccache
2680 uses when invoking the preprocessor.
2682 - Added a new `limit_multiple` (`CCACHE_LIMIT_MULTIPLE`) configuration option,
2683 which specifies how much of the cache to remove when cleaning.
2685 - Added a new `keep_comments_cpp` (`CCACHE_COMMENTS`) configuration option,
2686 which tells ccache not to discard the comments before hashing preprocessor
2687 output. This can be used to check documentation with `-Wdocumentation`.
2689 - Added a new sloppiness option `no_system_headers`, which tells ccache not to
2690 include system headers in manifest files.
2692 - Added a new statistics counter that tracks the number of performed cleanups
2693 due to the cache size being over the limit. The value is shown in the output
2696 - Added support for relocating debug info directory using `-fdebug-prefix-map`.
2697 This allows for cache hits even when `hash_dir` is used in combination with
2700 - Added a new "`cache hit rate`" field to the output of "`ccache -s`".
2702 - Added support for caching compilation of assembler code produced by e.g. "`gcc
2705 - Added support for cuda including the -optf/--options-file option.
2707 - Added support for Fortran 77.
2709 - Added support for multiple `-arch` options to produce "`fat binaries`".
2711 - Multiple identical `-arch` arguments are now handled without bailing.
2713 - The concatenated form of some long compiler options is now recognized, for
2714 example when using `-isystemPATH` instead of `-isystem PATH`.
2716 - If hard-linking is enabled and but fails (e.g. due to cross-device linking),
2717 ccache now falls back to copying instead of running the compiler.
2719 - Made the `hash_dir` option only have effect when generating debug info.
2721 - ccache now knows how to convert absolute paths to relative paths inside
2722 dependency files when using `base_dir`.
2724 - Improved parsing of `-g*` options.
2726 - Made ccache understand `-Wp,-D*` options.
2728 - ccache now understands the undocumented `-coverage` (only one dash) GCC
2731 - Names of included files are no longer included in the hash of the compiler's
2732 preprocessed output. This leads to more potential cache hits when not using
2735 - Increased buffer size used when reading file data. This improves performance
2741 - Bail out on too hard compiler option `-P`.
2743 - Fixed Clang test suite when running on Linux.
2745 - Fixed build and test for MinGW32 and Windows.
2750 Release date: 2016-09-28
2755 - Fixed a regression in ccache 3.2.8: ccache could get confused when using the
2756 compiler option `-Wp,` to pass multiple options to the preprocessor,
2757 resulting in missing dependency files from direct mode cache hits.
2762 Release date: 2016-09-07
2767 - Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
2768 path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
2769 (`CCACHE_CPP2`) is enabled.
2771 - ccache now understands the undocumented `-coverage` (only one dash) GCC
2777 Release date: 2016-07-20
2782 - Fixed a bug which could lead to false cache hits for compiler command lines
2783 with a missing argument to an option that takes an argument.
2785 - ccache now knows how to work around a glitch in the output of GCC 6's
2791 Release date: 2016-07-12
2796 - Fixed build problem on QNX, which lacks "`SA_RESTART`".
2798 - Bail out on compiler option `-fstack-usage` since it creates a `.su` file
2799 which ccache currently doesn't handle.
2801 - Fixed a bug where (due to ccache rewriting paths) the compiler could choose
2802 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
2803 is absolute and is a symlink.
2808 Release date: 2016-04-17
2811 === New features and enhancements
2813 - Only pass Clang-specific `-stdlib=` to the preprocessor.
2815 - Improved handling of stale NFS handles.
2817 - Made it harder to misinterpret documentation of boolean environment settings'
2823 - Include m4 files used by configure.ac in the source dist archives.
2825 - Corrected "`Performance`" section in the manual regarding `__DATE_`,
2826 `+__TIME__+` and `+__FILE__+` macros.
2828 - Fixed build on Solaris 10+ and AIX 7.
2830 - Fixed failure to create directories on QNX.
2832 - Don't (try to) update manifest file in "`read-only`" and "`read-only direct`"
2835 - Fixed a bug in caching of `stat` system calls in "`file_stat_matches
2838 - Fixed bug in hashing of Clang plugins, leading to unnecessary cache misses.
2840 - Fixed --print-config to show "`pch_defines sloppiness`".
2842 - The man page is now built when running "`make install`" from Git repository
2848 Release date: 2015-10-08
2853 - Fixed build error related to zlib on systems with older make versions
2854 (regression in ccache 3.2.3).
2856 - Made conversion-to-bool explicit to avoid build warnings (and potential
2857 runtime errors) on legacy systems.
2859 - Improved signal handling: Kill compiler on SIGTERM; wait for compiler to exit
2860 before exiting; die appropriately.
2862 - Minor fixes related to Windows support.
2864 - The correct compression level is now used if compression is requested.
2866 - Fixed a bug where cache cleanup could be run too early for caches larger than
2867 64 GiB on 32-bit systems.
2872 Release date: 2015-08-16
2875 === New features and enhancements
2877 - Added support for compiler option `-gsplit-dwarf`.
2882 - Support external zlib in nonstandard directory.
2884 - Avoid calling `exit()` inside an exit handler.
2886 - Let exit handler terminate properly.
2888 - Bail out on compiler option `--save-temps` in addition to `-save-temps`.
2890 - Only log "`Disabling direct mode`" once when failing to read potential include
2896 Release date: 2015-05-10
2899 === New features and enhancements
2901 - Added support for `CCACHE_COMPILERCHECK=string:<value>`. This is a faster
2902 alternative to `CCACHE_COMPILERCHECK=<command>` if the command's output can
2903 be precalculated by the build system.
2905 - Add support for caching code coverage results (compiling for gcov).
2910 - Made hash of cached result created with and without `CCACHE_CPP2` different.
2911 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
2912 clear the cache to get new results.
2914 - Don't try to reset a nonexistent stats file. This avoids "`No such file or
2915 directory`" messages in the ccache log when the cache directory doesn't exist.
2917 - Fixed a bug where ccache deleted Clang diagnostics after compiler failures.
2919 - Avoid performing an unnecessary copy of the object file on a cache miss.
2921 - Bail out on too hard compiler option `-fmodules`.
2923 - Bail out on too hard compiler option `-fplugin=libcc1plugin` (interaction
2926 - Fixed build error when compiling ccache with recent Clang versions.
2928 - Removed signal-unsafe code from signal handler.
2930 - Corrected logic for when to output cached stderr.
2932 - Wipe the whole cached result on failure retrieving a cached file.
2934 - Fixed build error when compiling ccache with recent Clang versions.
2939 Release date: 2014-12-10
2944 - Fixed regression in temporary file handling, which lead to incorrect
2945 permissions for stats, manifest and ccache.conf files in the cache.
2947 - `CACHEDIR.TAG` files are now created in the [0-9a-f] subdirectories so that
2948 ccache.conf is not lost in backups.
2950 - Made the default cache size suffix `G`, as previously documented.
2952 - `-fdiagnostics-color=auto` is now passed to the compiler even if stderr is
2953 redirected. This fixes a problem when, for instance, a configure test probes
2954 if the compiler (wrapped via ccache) supports `-fdiagnostics-color=auto`.
2956 - Added missing documentation for `max_files` and `max_size` configuration
2962 Release date: 2014-11-17
2965 === New features and enhancements
2967 - Added support for configuring ccache via one or several configuration files
2968 instead of via environment variables. Environment variables still have
2969 priority but are no longer the recommended way of customizing ccache
2970 behavior. See the manual for more information.
2972 - Added support for compiler error/warning messages with color.
2974 - Made creation of temporary directories and cache directories smarter to avoid
2975 unnecessary `stat` calls.
2977 - Improved efficiency of the algorithm that scans for `__DATE_` and `+__TIME__+`
2978 tokens in the hashed source code.
2980 - Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
2982 - The `-c` option is no longer passed to the preprocessor. This fixes problems
2983 with Clang and Solaris's C++ compiler.
2985 - ccache no longer passes preprocessor options like `-D` and `-I` to the
2986 compiler when compiling preprocessed output. This fixes warnings emitted by
2989 - Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
2990 `-fbranch-probabilities` are now handled without bailing.
2992 - Added support for Clang's `--serialize-diagnostic` option, storing the
2993 diagnostic file (`.dia`) in the cache.
2995 - Added support for precompiled headers when using Clang.
2997 - Added support for Clang `.pth` (pretokenized header) files.
2999 - Changed the `-x` language option to use the new objective C standard for GCC
3002 - On a cache miss, ccache now instructs the compiler to create the object file
3003 at the real destination and then copies the file into the cache instead of
3004 the other way around. This is needed to support compiler options like
3005 `-fprofile-arcs` and `--serialize-diagnostics`.
3007 - ccache now checks that included files' ctimes aren't too new. This check can
3008 be turned off by adding `include_file_ctime` to the "`ccache sloppiness`"
3011 - Added possibility to get cache hits based on filename, size, mtime and ctime
3012 only. On other words, source code files are not even read, only stat-ed. This
3013 operation mode is opt-in by adding `file_stat_matches` to the "`ccache
3014 sloppiness`" setting.
3016 - The filename part of options like `-Wp,-MDfilename` is no longer included in
3017 the hash since the filename doesn't have any bearing on the result.
3019 - Added a "`read-only direct`" configuration setting, which is like the ordinary
3020 read-only setting except that ccache will only try to retrieve results from
3021 the cache using the direct mode, not the preprocessor mode.
3023 - The display and interpretation of cache size has been changed to use SI
3026 - Default cache size is now 5 GB (was previously 1 GiB).
3028 - Added configuration option to set the compression level of compressed object
3031 - Added support for `@file` and `-@file` arguments (reading options from a
3034 - `-Wl,` options are no longer included in the hash since they don't affect
3037 - Bail out on too hard compiler option `-Wp,-P`.
3039 - Optimized MD4 calculation code on little-endian systems.
3041 - Various improvements and fixes on win32.
3043 - Improved logging to the ccache log file.
3045 - Added `--dump-manifest` command-line option for debugging purposes.
3047 - Added `--with-bundled-zlib` configure option.
3049 - Upgraded bundled zlib to version 1.2.8.
3051 - Improved `dev.mk` to be more platform independent.
3053 - Made the test suite work with Clang and gcc-llvm on OS X.
3055 - Various other improvements of the test suite.
3060 - Any previous `.stderr` is now removed from the cache when recaching.
3062 - Fixed an issue when handling the `-arch` compiler option with an argument.
3064 - Fixed race condition when creating the initial cache directory.
3066 - Fixed test suite failures when `CC` is a ccache-wrapped compiler.
3071 Release date: 2016-07-12
3076 - Fixed a bug where (due to ccache rewriting paths) the compiler could choose
3077 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
3078 is absolute and is a symlink.
3083 Release date: 2015-03-07
3088 - Fixed bug which could result in false cache hits when source code contains
3089 `'"'` followed by `" /*"` or `" //"` (with variations).
3091 - Made hash of cached result created with and without `CCACHE_CPP2` different.
3092 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
3093 clear the cache to get new results.
3095 - Don't try to reset a nonexistent stats file. This avoids "`No such file or
3096 directory`" messages in the ccache log when the cache directory doesn't exist.
3101 Release date: 2014-10-19
3104 === New features and enhancements
3106 - Added support for the `-Xclang` compiler option.
3108 - Improved handling of exit code of internally executed processes.
3110 - Zero length object files in the cache are now rejected as invalid.
3112 - Bail out on option `-gsplit-dwarf` (since it produces multiple output files).
3114 - Compiler option `-fdebug-prefix-map` is now ignored (not part of the hash).
3115 (The `-fdebug-prefix-map` option may be used in combination with
3116 `CCACHE_BASEDIR` to reuse results across different directories.)
3118 - Added note in documentation that `--ccache-skip` currently does not mean
3119 "`don't hash the following option`".
3121 - To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also
3122 needs to include the new `pch_defines` sloppiness. This is because ccache
3123 can't detect changes in the source code when only defined macros have been
3126 - Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now
3127 cleaned up if they are older than one hour.
3132 - Fixed path canonicalization in `make_relative_path()` when path doesn't
3135 - Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR`
3138 - ccache no longer tries to create the cache directory when `CCACHE_DISABLE` is
3141 - Fixed bug when reading manifests with a very large number of file info
3144 - Fixed problem with logging of current working directory.
3149 Release date: 2013-01-06
3154 - The EAGAIN signal is now handled correctly when emitting cached stderr
3155 output. This fixes a problem triggered by large error outputs from the
3158 - Subdirectories in the cache are no longer created in read-only mode.
3160 - Fixed so that ccache's log file descriptor is not made available to the
3163 - Improved error reporting when failing to create temporary stdout/stderr files
3164 when executing the compiler.
3166 - Disappearing temporary stdout/stderr files are now handled gracefully.
3171 - Fixed test suite to work on ecryptfs.
3176 Release date: 2012-08-11
3179 === New features and enhancements
3181 - Made paths to dependency files relative in order to increase cache hits.
3183 - Added work-around to make ccache work with buggy GCC 4.1 when creating a
3184 pre-compiled header.
3186 - Clang plugins are now hashed to catch plugin upgrades.
3191 - Fixed crash when the current working directory has been removed.
3193 - Fixed crash when stderr is closed.
3195 - Corrected a corner case when parsing backslash escapes in string
3198 - Paths are now correctly canonicalized when computing paths relative to the
3204 - Made git version macro work when compiling outside of the source directory.
3206 - Fixed `static_assert` macro definition clash with GCC 4.7.
3211 Release date: 2012-01-08
3216 - Non-writable `CCACHE_DIR` is now handled gracefully when `CCACHE_READONLY` is
3219 - Made failure to create files (typically due to bad directory permissions) in
3220 the cache directory fatal. Previously, such failures were silently and
3221 erroneously flagged as "`compiler produced stdout`".
3223 - Both the `-specs=file` and `--specs=file` forms are now recognized.
3225 - Added recognition and hashing of GCC plugins specified with `-fplugin=file`.
3227 - `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs files
3230 - Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the hash
3231 to avoid false cache hits when such variables have changed.
3233 - Corrected log message when unify mode is enabled.
3235 - Reverted the GCC bug compatibility introduced in ccache 3.1.5 for `-MT`/`-MQ`
3236 options with concatenated arguments. (The bug is fixed in recent GCC
3242 - Corrected license header for `mdfour.c`.
3244 - Improved documentation on how to fix bad object files in the cache.
3250 Release date: 2011-08-21
3253 === New features and enhancements
3255 - Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used.
3260 - Don't crash if `getcwd()` fails.
3262 - Fixed alignment of "`called for preprocessing`" counter.
3267 Release date: 2011-05-29
3270 === New features and enhancements
3272 - Added a new statistics counter named "`called for preprocessing`".
3274 - The original command line is now logged to the file specified with
3277 - Improved error logging when system calls fail.
3279 - Added support for rewriting absolute paths in `-F`/`-iframework` GCC
3282 - Improved order of statistics counters in `ccache -s` output.
3287 - The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled
3288 correctly when they are last on the command line.
3290 - ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with
3291 concatenated arguments.
3293 - Fixed a minor memory leak.
3295 - Systems that lack (and don't need to be linked with) libm are now supported.
3300 Release date: 2011-01-09
3305 - Made a work-around for a bug in `gzputc()` in zlib 1.2.5.
3307 - Corrupt manifest files are now removed so that they won't block direct mode
3310 - ccache now copes with file systems that don't know about symbolic links.
3312 - The file handle is now correctly closed on write error when trying to create
3318 Release date: 2010-11-28
3323 - The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between
3324 option and argument) are now handled correctly.
3329 - Portability fixes for HP-UX 11.00 and other less common systems.
3334 Release date: 2010-11-21
3339 - Bail out on too hard compiler options `-fdump-*`.
3341 - NULL return values from malloc/calloc of zero bytes are now handled
3344 - Fixed issue when parsing precompiler output on AIX.
3349 - Improved documentation on which information is included in the hash sum.
3351 - Made the "`too new header file`" test case work on file systems with
3352 unsynchronized clocks.
3354 - The test suite now also works on systems that lack a /dev/zero.
3359 Release date: 2010-11-07
3364 - ccache now falls back to preprocessor mode when a non-regular include file
3365 (device, socket, etc) has been detected so that potential hanging due to
3366 blocking reads is avoided.
3368 - CRC errors are now detected when decompressing compressed files in the cache.
3370 - Fixed potential object file corruption race on NFS.
3372 - Minor documentation corrections.
3374 - Fixed configure detection of ar.
3376 - ccache development version (set by dev.mk) now works with gits whose
3377 `describe` command doesn't understand `--dirty`.
3382 - Minor debug log message improvements.
3387 Release date: 2010-09-16
3390 === New features and enhancements
3392 - Added support for hashing the output of a custom command (e.g. `%compiler%
3393 --version`) to identify the compiler instead of stat-ing or hashing the
3394 compiler binary. This can improve robustness when the compiler (as seen by
3395 ccache) actually isn't the real compiler but another compiler wrapper.
3397 - Added support for caching compilations that use precompiled headers. (See the
3398 manual for important instructions regarding this.)
3400 - Locking of the files containing statistics counters is now done using
3401 symlinks instead of POSIX locks. This should make ccache behave a lot better
3402 on file systems where POSIX locks are slow or broken (e.g. NFS on some
3405 - Manifest files are now updated without the need of taking locks.
3407 - Updates of statistics counters are now always done in one of the sub-level
3408 statistics files. This reduces lock contention, which especially improves
3409 performance on slow NFS mounts.
3411 - Reading and writing of statistics counters has been made forward-compatible
3412 (unknown counters are retained).
3414 - Files are now read without using `mmap()`. This has two benefits: it's more
3415 robust against file changes during reading and it improves performance on
3416 poor systems where `mmap()` doesn't use the disk cache.
3418 - Added `.cp` and `.CP` as known C++ suffixes.
3422 - Added `-install_name` as an option known to take an argument. (This improves
3423 statistics when using the Darwin linker.)
3428 - Non-fatal error messages are now never printed to stderr but logged instead.
3430 - Fixed a bug affecting failing commands when `--ccache-skip` is used.
3432 - Made `--ccache-skip` work for all options.
3434 - EINTR is now handled correctly.
3439 - Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The
3440 port is not yet finished, but will hopefully be complete in some subsequent
3443 - Added a `--nostats` flag to the performance benchmark program.
3445 - Made the performance benchmark program more accurate when measuring cache
3448 - Added a new test framework for unit tests written in C.
3450 - Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` presence.
3452 - Improved documentation on how to combine ccache with other compiler wrappers
3455 - New `LICENSE.txt` file with licensing and copyright details about bundled
3458 - New `AUTHORS.txt` file with a list of ccache contributors.
3460 - New `HACKING.txt` file with some notes about ccache code conventions.
3465 Release date: 2010-07-15
3470 - The statistics counter "`called for link`" is now correctly updated when
3471 linking with a single object file.
3473 - Fixed a problem with out-of-source builds.
3478 Release date: 2010-06-20
3484 - ccache is now licensed under the GNU General Public License (GPL) version 3
3490 - The way the hashes are calculated has changed, so you won't get cache hits
3491 for compilation results stored by older ccache versions. Because of this, you
3492 might as well clear the old cache directory with `ccache --clear` if you
3493 want, unless you plan to keep using an older ccache version.
3496 === New features and enhancements
3498 - ccache now has a "`direct mode`" where it computes a hash of the source code
3499 (including all included files) and compiler options without running the
3500 preprocessor. By not running the preprocessor, CPU usage is reduced; the
3501 speed is somewhere between 1 and 5 times that of ccache running in
3502 traditional mode, depending on the circumstances. The speedup will be higher
3503 when I/O is fast (e.g., when files are in the disk cache). The direct mode
3504 can be disabled by setting +CCACHE_NODIRECT+.
3506 - Support has been added for rewriting absolute paths to relative paths when
3507 hashing, in order to increase cache hit rate when building the same source
3508 code in different directories even when compiling with `-g` and when using
3509 absolute include directory paths. This is done by setting the
3510 `CCACHE_BASEDIR` environment variable to an absolute path that specifies
3511 which paths to rewrite.
3513 - Object files are now optionally stored compressed in the cache. The runtime
3514 cost is negligible, and more files will fit in the ccache directory and in
3515 the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note
3516 that you can't use compression in combination with the hard link feature.
3518 - A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what
3519 compiler-identifying information to hash to ensure that results retrieved
3520 from the cache are accurate. Possible values are: none (don't hash anything),
3521 mtime (hash the compiler's mtime and size) and content (hash the content of
3522 the compiler binary). The default is mtime.
3524 - It is now possible to specify extra files whose contents should be included
3525 in the hash sum by setting the `CCACHE_EXTRAFILES` option.
3527 - Added support for Objective-C and Objective-C\+\+. The statistics counter
3528 "`not a C/C++ file`" has been renamed to "`unsupported source language`".
3530 - Added support for the `-x` compiler option.
3532 - Added support for long command-line options.
3534 - A `CACHEDIR.TAG` file is now created in the cache directory. See
3535 <http://www.brynosaurus.com/cachedir/>.
3537 - Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have been
3540 - You can relax some checks that ccache does in direct mode by setting
3541 `CCACHE_SLOPPINESS`. See the manual for more information.
3543 - `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as
3546 - The default value of `CCACHE_TEMPDIR` has been changed to `$CCACHE_DIR/tmp`
3547 to avoid cluttering the top directory.
3549 - Temporary files that later will be moved into the cache are now created in
3550 the cache directory they will end up in. This makes ccache more friendly to
3551 Linux's directory layout.
3553 - Improved the test suite and added tests for most of the new functionality.
3554 It's now also possible to specify a subset of tests to run.
3556 - Standard error output from the compiler is now only stored in the cache if
3559 - If the compiler produces no object file or an empty object file, but gives a
3560 zero exit status (could be due to a file system problem, a buggy program
3561 specified by `CCACHE_PREFIX`, etc.), ccache copes with it properly.
3563 - Added `installcheck` and `distcheck` make targets.
3565 - Clarified cache size limit options' and cleanup semantics.
3567 - Improved display of cache max size values.
3569 - The following options are no longer hashed in the preprocessor mode:
3570 `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, `-iwithprefix`,
3571 `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and `-U`.
3576 - Various portability improvements.
3578 - Improved detection of home directory.
3580 - User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile.
3584 - Computation of the hash sum has been improved to decrease the risk of hash
3585 collisions. For instance, the compiler options `-X -Y` and `-X-Y` previously
3586 contributed equally to the hash sum.
3588 - Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`,
3589 `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and
3590 `-save-temps`. Also bail out on `@file` style options.
3592 - Errors when using multiple `-arch` compiler options are now noted as
3593 "`unsupported compiler option`".
3595 - `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.
3597 - The `-finput-charset` option is now handled correctly.
3599 - Added support for `-Wp,-MD` and `-Wp,-MMD` options.
3601 - The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly
3602 recognized as taking an argument.
3604 - Debug information containing line numbers of predefined and command-line
3605 macros (enabled with the compiler option `-g3`) will now be correct.
3607 - Corrected LRU cleanup handling of object files.
3609 - `utimes()` is now used instead of `utime()` when available.
3611 - Non-writable cache directories are now handled gracefully.
3613 - Corrected documentation about sharing the cache directory.
3615 - Fixed compilation warnings from GCC 4.3.
3617 - The command specified by `CCACHE_PREFIX` is no longer part of the hash.
3619 - Fixed bad memory access spotted by Valgrind.
3621 - Fixed a bug in `x_realloc`.
3623 - Freed memory is no longer referenced when compiling a `.i`/`.ii` file and
3624 falling back to running the real compiler.
3626 - The test suite is now immune to external values of the `CCACHE_*` environment
3629 - Improved detection of recursive invocation.
3631 - The ccache binary is now not unconditionally stripped when installing.
3633 - Statistics counters are now correctly updated for -E option failures and