7 Release date: 2016-07-12
12 - Fixed build problem on QNX, which lacks ``SA_RESTART''.
14 - Bail out on compiler option `-fstack-usage` since it creates a `.su` file
15 which ccache currently doesn't handle.
17 - ccache now knows how to work around a glitch in the output of GCC 6's
20 - Fixed a bug where (due to ccache rewriting paths) the compiler could choose
21 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
22 is absolute and is a symlink.
27 Release date: 2016-04-17
29 New features and improvements
30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 - Only pass clang-specific `-stdlib=` to the preprocessor.
34 - Improved handling of stale NFS handles.
36 - Made it harder to misinterpret documentation of boolean environment settings'
43 - Include m4 files used by configure.ac in the source dist archives.
45 - Corrected "Performance" section in the manual regarding `__DATE_`, `__TIME__`
46 and `__FILE__` macros.
48 - Fixed build on Solaris 10+ and AIX 7.
50 - Fixed failure to create directories on QNX.
52 - Don't (try to) update manifest file in ``read-only'' and ``read-only direct''
55 - Fixed a bug in caching of `stat` system calls in ``file_stat_matches
58 - Fixed bug in hashing of clang plugins, leading to unnecessary cache misses.
60 - Fixed --print-config to show ``pch_defines sloppiness''.
62 - The man page is now built when running ``make install'' from Git repository
68 Release date: 2015-10-08
74 - Fixed build error related to zlib on systems with older make versions
75 (regression in ccache 3.2.3).
77 - Made conversion-to-bool explicit to avoid build warnings (and potential
78 runtime errors) on legacy systems.
80 - Improved signal handling: Kill compiler on SIGTERM; wait for compiler to exit
81 before exiting; die appropriately.
83 - Minor fixes related to Windows support.
85 - The correct compression level is now used if compression is requested.
87 - Fixed a bug where cache cleanup could be run too early for caches larger than
88 64 GiB on 32-bit systems.
93 Release date: 2015-08-16
96 New features and improvements
97 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99 - Added support for compiler option `-gsplit-dwarf`.
105 - Support external zlib in nonstandard directory.
107 - Avoid calling `exit()` inside an exit handler.
109 - Let exit handler terminate properly.
111 - Bail out on compiler option `--save-temps` in addition to `-save-temps`.
113 - Only log "Disabling direct mode" once when failing to read potential include
119 Release date: 2015-05-10
122 New features and improvements
123 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125 - Added support for `CCACHE_COMPILERCHECK=string:<value>`. This is a faster
126 alternative to `CCACHE_COMPILERCHECK=<command>` if the command's output can
127 be precalculated by the build system.
129 - Add support for caching code coverage results (compiling for gcov).
135 - Made hash of cached result created with and without `CCACHE_CPP2` different.
136 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
137 clear the cache to get new results.
139 - Don't try to reset a non-existing stats file. This avoids ``No such file or
140 directory'' messages in the ccache log when the cache directory doesn't
143 - Fixed a bug where ccache deleted clang diagnostics after compiler failures.
145 - Avoid performing an unnecessary copy of the object file on a cache miss.
147 - Bail out on too hard compiler option `-fmodules`.
149 - Bail out on too hard compiler option `-fplugin=libcc1plugin` (interaction
152 - Fixed build error when compiling ccache with recent clang versions.
154 - Removed signal-unsafe code from signal handler.
156 - Corrected logic for when to output cached stderr.
158 - Wipe the whole cached result on failure retrieving a cached file.
160 - Fixed build error when compiling ccache with recent clang versions.
165 Release date: 2014-12-10
171 - Fixed regression in temporary file handling, which lead to incorrect
172 permissions for stats, manifest and ccache.conf files in the cache.
174 - `CACHEDIR.TAG` files are now created in the [0-9a-f] subdirectories so that
175 ccache.conf is not lost in backups.
177 - Made the default cache size suffix `G`, as previously documented.
179 - `-fdiagnostics-color=auto` is now passed to the compiler even if stderr is
180 redirected. This fixes a problem when, for instance, a configure test probes
181 if the compiler (wrapped via ccache) supports `-fdiagnostics-color=auto`.
183 - Added missing documentation for `max_files` and `max_size` configuration
189 Release date: 2014-11-17
192 New features and improvements
193 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195 - Added support for configuring ccache via one or several configuration files
196 instead of via environment variables. Environment variables still have
197 priority but are no longer the recommended way of customizing ccache
198 behavior. See the manual for more information.
200 - Added support for compiler error/warning messages with color.
202 - Made creation of temporary directories and cache directories smarter to avoid
203 unnecessary `stat` calls.
205 - Improved efficiency of the algorithm that scans for `__DATE_` and `__TIME__`
206 tokens in the hashed source code.
208 - Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
210 - The `-c` option is no longer passed to the preprocessor. This fixes problems
211 with clang and Solaris's C++ compiler.
213 - ccache no longer passes preprocessor options like `-D` and `-I` to the
214 compiler when compiling preprocessed output. This fixes warnings emitted by
217 - Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
218 `-fbranch-probabilities` are now handled without bailing.
220 - Added support for clang's `--serialize-diagnostic` option, storing the
221 diagnostic file (`.dia`) in the cache.
223 - Added support for precompiled headers when using clang.
225 - Added support for clang `.pth` (pretokenized header) files.
227 - Changed the `-x` language option to use the new objective C standard for GCC
230 - On a cache miss, ccache now instructs the compiler to create the object file
231 at the real destination and then copies the file into the cache instead of
232 the other way around. This is needed to support compiler options like
233 `-fprofile-arcs` and `--serialize-diagnostics`.
235 - ccache now checks that included files' ctimes aren't too new. This check can
236 be turned off by adding `include_file_ctime` to the ``ccache sloppiness''
239 - Added possibility to get cache hits based on filename, size, mtime and ctime
240 only. On other words, source code files are not even read, only stat-ed. This
241 operation mode is opt-in by adding `file_stat_matches` to the ``ccache
242 sloppiness'' setting.
244 - The filename part of options like `-Wp,-MDfilename` is no longer included in
245 the hash since the filename doesn't have any bearing on the result.
247 - Added a ``read-only direct'' configuration setting, which is like the
248 ordinary read-only setting except that ccache will only try to retrieve
249 results from the cache using the direct mode, not the preprocessor mode.
251 - The display and interpretation of cache size has been changed to use SI
254 - Default cache size is now 5 GB (was previously 1 GiB).
256 - Added configuration option to set the compression level of compressed object
259 - Added support for `@file` and `-@file` arguments (reading options from a
262 - `-Wl,` options are no longer included in the hash since they don't affect
265 - Bail out on too hard compiler option `-Wp,-P`.
267 - Optimized MD4 calculation code on little-endian systems.
269 - Various improvements and fixes on win32.
271 - Improved logging to the ccache log file.
273 - Added `--dump-manifest` command-line option for debugging purposes.
275 - Added `--with-bundled-zlib` configure option.
277 - Upgraded bundled zlib to version 1.2.8.
279 - Improved `dev.mk` to be more platform independent.
281 - Made the test suite work with clang and gcc-llvm on OS X.
283 - Various other improvements of the test suite.
289 - Any previous `.stderr` is now removed from the cache when recaching.
291 - Fixed an issue when handling the `-arch` compiler option with an argument.
293 - Fixed race condition when creating the initial cache directory.
295 - Fixed test suite failures when `CC` is a ccache-wrapped compiler.
300 Release date: 2016-07-12
306 - Fixed a bug where (due to ccache rewriting paths) the compiler could choose
307 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
308 is absolute and is a symlink.
313 Release date: 2015-03-07
319 - Fixed bug which could result in false cache hits when source code contains
320 `'"'` followed by `" /*"` or `" //"` (with variations).
322 - Made hash of cached result created with and without `CCACHE_CPP2` different.
323 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
324 clear the cache to get new results.
326 - Don't try to reset a non-existing stats file. This avoids ``No such file or
327 directory'' messages in the ccache log when the cache directory doesn't
333 Release date: 2014-10-19
336 New features and improvements
337 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
339 - Added support for the `-Xclang` compiler option.
341 - Improved handling of exit code of internally executed processes.
343 - Zero length object files in the cache are now rejected as invalid.
345 - Bail out on option `-gsplit-dwarf` (since it produces multiple output files).
347 - Compiler option `-fdebug-prefix-map` is now ignored (not part of the hash).
348 (The `-fdebug-prefix-map` option may be used in combination with
349 `CCACHE_BASEDIR` to reuse results across different directories.)
351 - Added note in documentation that `--ccache-skip` currently does not mean
352 ``don't hash the following option''.
354 - To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also
355 needs to include the new `pch_defines` sloppiness. This is because ccache
356 can't detect changes in the source code when only defined macros have been
359 - Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now
360 cleaned up if they are older than one hour.
366 - Fixed path canonicalization in `make_relative_path()` when path doesn't
369 - Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR`
372 - ccache no longer tries to create the cache directory when `CCACHE_DISABLE` is
375 - Fixed bug when reading manifests with a very large number of file info
378 - Fixed problem with logging of current working directory.
383 Release date: 2013-01-06
389 - The EAGAIN signal is now handled correctly when emitting cached stderr
390 output. This fixes a problem triggered by large error outputs from the
393 - Subdirectories in the cache are no longer created in read-only mode.
395 - Fixed so that ccache's log file descriptor is not made available to the
398 - Improved error reporting when failing to create temporary stdout/stderr files
399 when executing the compiler.
401 - Disappearing temporary stdout/stderr files are now handled gracefully.
407 - Fixed test suite to work on ecryptfs.
412 Release date: 2012-08-11
415 New features and improvements
416 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
418 - Made paths to dependency files relative in order to increase cache hits.
420 - Added work-around to make ccache work with buggy GCC 4.1 when creating a
423 - Clang plugins are now hashed to catch plugin upgrades.
429 - Fixed crash when the current working directory has been removed.
431 - Fixed crash when stderr is closed.
433 - Corrected a corner case when parsing backslash escapes in string
436 - Paths are now correctly canonicalized when computing paths relative to the
443 - Made git version macro work when compiling outside of the source directory.
445 - Fixed `static_assert` macro definition clash with GCC 4.7.
450 Release date: 2012-01-08
456 - Non-writable `CCACHE_DIR` is now handled gracefully when `CCACHE_READONLY` is
459 - Made failure to create files (typically due to bad directory permissions) in
460 the cache directory fatal. Previously, such failures were silently and
461 erroneously flagged as "compiler produced stdout".
463 - Both the `-specs=file` and `--specs=file` forms are now recognized.
465 - Added recognition and hashing of GCC plugins specified with `-fplugin=file`.
467 - `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs files
470 - Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the hash
471 to avoid false cache hits when such variables have changed.
473 - Corrected log message when unify mode is enabled.
475 - Reverted the GCC bug compatibility introduced in ccache 3.1.5 for `-MT`/`-MQ`
476 options with concatenated arguments. (The bug is fixed in recent GCC
483 - Corrected license header for `mdfour.c`.
485 - Improved documentation on how to fix bad object files in the cache.
491 Release date: 2011-08-21
494 New features and improvements
495 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
497 - Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used.
503 - Don't crash if `getcwd()` fails.
505 - Fixed alignment of ``called for preprocessing'' counter.
510 Release date: 2011-05-29
513 New features and improvements
514 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
516 - Added a new statistics counter named ``called for preprocessing''.
518 - The original command line is now logged to the file specified with
521 - Improved error logging when system calls fail.
523 - Added support for rewriting absolute paths in `-F`/`-iframework` GCC
526 - Improved order of statistics counters in `ccache -s` output.
532 - The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled
533 correctly when they are last on the command line.
535 - ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with
536 concatenated arguments.
538 - Fixed a minor memory leak.
540 - Systems that lack (and don't need to be linked with) libm are now supported.
545 Release date: 2011-01-09
551 - Made a work-around for a bug in `gzputc()` in zlib 1.2.5.
553 - Corrupt manifest files are now removed so that they won't block direct mode
556 - ccache now copes with file systems that don't know about symbolic links.
558 - The file handle in now correctly closed on write error when trying to create
564 Release date: 2010-11-28
570 - The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between
571 option and argument) are now handled correctly.
577 - Portability fixes for HP-UX 11.00 and other esoteric systems.
582 Release date: 2010-11-21
588 - Bail out on too hard compiler options `-fdump-*`.
590 - NULL return values from malloc/calloc of zero bytes are now handled
593 - Fixed issue when parsing precompiler output on AIX.
599 - Improved documentation on which information is included in the hash sum.
601 - Made the ``too new header file'' test case work on file systems with
602 unsynchronized clocks.
604 - The test suite now also works on systems that lack a /dev/zero.
609 Release date: 2010-11-07
615 - ccache now falls back to preprocessor mode when a non-regular include file
616 (device, socket, etc) has been detected so that potential hanging due to
617 blocking reads is avoided.
619 - CRC errors are now detected when decompressing compressed files in the cache.
621 - Fixed potential object file corruption race on NFS.
623 - Minor documentation corrections.
625 - Fixed configure detection of ar.
627 - ccache development version (set by dev.mk) now works with gits whose
628 `describe` command doesn't understand `--dirty`.
634 - Minor debug log message improvements.
639 Release date: 2010-09-16
642 New features and improvements
643 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
645 - Added support for hashing the output of a custom command (e.g. `%compiler%
646 --version`) to identify the compiler instead of stat-ing or hashing the
647 compiler binary. This can improve robustness when the compiler (as seen by
648 ccache) actually isn't the real compiler but another compiler wrapper.
650 - Added support for caching compilations that use precompiled headers. (See the
651 manual for important instructions regarding this.)
653 - Locking of the files containing statistics counters is now done using
654 symlinks instead of POSIX locks. This should make ccache behave a lot better
655 on file systems where POSIX locks are slow or broken (e.g. NFS on some
658 - Manifest files are now updated without the need of taking locks.
660 - Updates of statistics counters are now always done in one of the sub-level
661 statistics files. This reduces lock contention, which especially improves
662 performance on slow NFS mounts.
664 - Reading and writing of statistics counters has been made forward-compatible
665 (unknown counters are retained).
667 - Files are now read without using `mmap()`. This has two benefits: it's more
668 robust against file changes during reading and it improves performance on
669 poor systems where `mmap()` doesn't use the disk cache.
671 - Added `.cp` and `.CP` as known C++ suffixes.
675 - Added `-install_name` as an option known to take an argument. (This improves
676 statistics when using the Darwin linker.)
682 - Non-fatal error messages are now never printed to stderr but logged instead.
684 - Fixed a bug affecting failing commands when `--ccache-skip` is used.
686 - Made `--ccache-skip` work for all options.
688 - EINTR is now handled correctly.
694 - Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The
695 port is not yet finished, but will hopefully be complete in some subsequent
698 - Added a `--nostats` flag to the performance benchmark program.
700 - Made the performance benchmark program more accurate when measuring cache
703 - Added a new test framework for unit tests written in C.
705 - Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` presence.
707 - Improved documentation on how to combine ccache with other compiler wrappers
710 - New `LICENSE.txt` file with licensing and copyright details about bundled
713 - New `AUTHORS.txt` file with a list of ccache contributors.
715 - New `HACKING.txt` file with some notes about ccache code conventions.
720 Release date: 2010-07-15
726 - The statistics counter ``called for link'' is now correctly updated when
727 linking with a single object file.
729 - Fixed a problem with out-of-source builds.
734 Release date: 2010-06-20
740 - ccache is now licensed under the GNU General Public License (GPL) version 3
747 - The way the hashes are calculated has changed, so you won't get cache hits
748 for compilation results stored by older ccache versions. Because of this, you
749 might as well clear the old cache directory with `ccache --clear` if you
750 want, unless you plan to keep using an older ccache version.
753 New features and improvements
754 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
756 - ccache now has a ``direct mode'' where it computes a hash of the source code
757 (including all included files) and compiler options without running the
758 preprocessor. By not running the preprocessor, CPU usage is reduced; the
759 speed is somewhere between 1 and 5 times that of ccache running in
760 traditional mode, depending on the circumstances. The speedup will be higher
761 when I/O is fast (e.g., when files are in the disk cache). The direct mode
762 can be disabled by setting +CCACHE_NODIRECT+.
764 - Support has been added for rewriting absolute paths to relative paths when
765 hashing, in order to increase cache hit rate when building the same source
766 code in different directories even when compiling with `-g` and when using
767 absolute include directory paths. This is done by setting the
768 `CCACHE_BASEDIR` environment variable to an absolute path that specifies
769 which paths to rewrite.
771 - Object files are now optionally stored compressed in the cache. The runtime
772 cost is negligible, and more files will fit in the ccache directory and in
773 the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note
774 that you can't use compression in combination with the hard link feature.
776 - A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what
777 compiler-identifying information to hash to ensure that results retrieved
778 from the cache are accurate. Possible values are: none (don't hash anything),
779 mtime (hash the compiler's mtime and size) and content (hash the content of
780 the compiler binary). The default is mtime.
782 - It is now possible to specify extra files whose contents should be included
783 in the hash sum by setting the `CCACHE_EXTRAFILES` option.
785 - Added support for Objective-C and Objective-C\+\+. The statistics counter
786 ``not a C/C++ file'' has been renamed to ``unsupported source language''.
788 - Added support for the `-x` compiler option.
790 - Added support for long command-line options.
792 - A `CACHEDIR.TAG` file is now created in the cache directory. See
793 <http://www.brynosaurus.com/cachedir/>.
795 - Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have been
798 - You can relax some checks that ccache does in direct mode by setting
799 `CCACHE_SLOPPINESS`. See the manual for more information.
801 - `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as
804 - The default value of `CCACHE_TEMPDIR` has been changed to `$CCACHE_DIR/tmp`
805 to avoid cluttering the top directory.
807 - Temporary files that later will be moved into the cache are now created in
808 the cache directory they will end up in. This makes ccache more friendly to
809 Linux's directory layout.
811 - Improved the test suite and added tests for most of the new functionality.
812 It's now also possible to specify a subset of tests to run.
814 - Standard error output from the compiler is now only stored in the cache if
817 - If the compiler produces no object file or an empty object file, but gives a
818 zero exit status (could be due to a file system problem, a buggy program
819 specified by `CCACHE_PREFIX`, etc.), ccache copes with it properly.
821 - Added `installcheck` and `distcheck` make targets.
823 - Clarified cache size limit options' and cleanup semantics.
825 - Improved display of cache max size values.
827 - The following options are no longer hashed in the preprocessor mode:
828 `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, `-iwithprefix`,
829 `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and `-U`.
835 - Various portability improvements.
837 - Improved detection of home directory.
839 - User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile.
843 - Computation of the hash sum has been improved to decrease the risk of hash
844 collisions. For instance, the compiler options `-X -Y` and `-X-Y` previously
845 contributed equally to the hash sum.
847 - Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`,
848 `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and
849 `-save-temps`. Also bail out on `@file` style options.
851 - Errors when using multiple `-arch` compiler options are now noted as
852 ``unsupported compiler option''.
854 - `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.
856 - The `-finput-charset` option is now handled correctly.
858 - Added support for `-Wp,-MD` and `-Wp,-MMD` options.
860 - The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly
861 recognized as taking an argument.
863 - Debug information containing line numbers of predefined and command-line
864 macros (enabled with the compiler option `-g3`) will now be correct.
866 - Corrected LRU cleanup handling of object files.
868 - `utimes()` is now used instead of `utime()` when available.
870 - Non-writable cache directories are now handled gracefully.
872 - Corrected documentation about sharing the cache directory.
874 - Fixed compilation warnings from GCC 4.3.
876 - The command specified by `CCACHE_PREFIX` is no longer part of the hash.
878 - Fixed bad memory access spotted by Valgrind.
880 - Fixed a bug in `x_realloc`.
882 - Freed memory is no longer referenced when compiling a `.i`/`.ii` file and
883 falling back to running the real compiler.
885 - The test suite is now immune to external values of the `CCACHE_*` environment
888 - Improved detection of recursive invocation.
890 - The ccache binary is now not unconditionally stripped when installing.
892 - Statistics counters are now correctly updated for -E option failures and