7 Release date: 2014-11-17
10 New features and improvements
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 - Added support for configuring ccache via one or several configuration files
14 instead of via environment variables. Environment variables still have
15 priority but are no longer the recommended way of customizing ccache
16 behavior. See the manual for more information.
18 - Added support for compiler error/warning messages with color.
20 - Made creation of temporary directories and cache directories smarter to avoid
21 unnecessary `stat` calls.
23 - Improved efficiency of the algorithm that scans for `__DATE_` and `__TIME__`
24 tokens in the hashed source code.
26 - Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
28 - The `-c` option is no longer passed to the preprocessor. This fixes problems
29 with clang and Solaris's C++ compiler.
31 - ccache no longer passes preprocessor options like `-D` and `-I` to the
32 compiler when compiling preprocessed output. This fixes warnings emitted by
35 - Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
36 `-fbranch-probabilities` are now handled without bailing.
38 - Added support for clang's `--serialize-diagnostic` option, storing the
39 diagnostic file (`.dia`) in the cache.
41 - Added support for precompiled headers when using clang.
43 - Added support for clang `.pth` (pretokenized header) files.
45 - Changed the `-x` language option to use the new objective C standard for GCC
48 - On a cache miss, ccache now instructs the compiler to create the object file
49 at the real destination and then copies the file into the cache instead of
50 the other way around. This is needed to support compiler options like
51 `-fprofile-arcs` and `--serialize-diagnostics`.
53 - ccache now checks that included files' ctimes aren't too new. This check can
54 be turned off by adding `include_file_ctime` to the ``ccache sloppiness''
57 - Added possibility to get cache hits based on filename, size, mtime and ctime
58 only. On other words, source code files are not even read, only stat-ed. This
59 operation mode is opt-in by adding `file_stat_matches` to the ``ccache
62 - The filename part of options like `-Wp,-MDfilename` is no longer included in
63 the hash since the filename doesn't have any bearing on the result.
65 - Added a ``read-only direct'' configuration setting, which is like the
66 ordinary read-only setting except that ccache will only try to retrieve
67 results from the cache using the direct mode, not the preprocessor mode.
69 - The display and interpretation of cache size has been changed to use SI
72 - Default cache size is now 5 GB (was previously 1 GiB).
74 - Added configuration option to set the compression level of compressed object
77 - Added support for `@file` and `-@file` arguments (reading options from a
80 - `-Wl,` options are no longer included in the hash since they don't affect
83 - Bail out on too hard compiler option `-Wp,-P`.
85 - Optimized MD4 calculation code on little-endian systems.
87 - Various improvements and fixes on win32.
89 - Improved logging to the ccache log file.
91 - Added `--dump-manifest` command-line option for debugging purposes.
93 - Added `--with-bundled-zlib` configure option.
95 - Upgraded bundled zlib to version 1.2.8.
97 - Improved `dev.mk` to be more platform independent.
99 - Made the test suite work with clang and gcc-llvm on OS X.
101 - Various other improvements of the test suite.
107 - Any previous `.stderr` is now removed from the cache when recaching.
109 - Fixed an issue when handling the `-arch` compiler option with an argument.
111 - Fixed race condition when creating the initial cache directory.
113 - Fixed test suite failures when `CC` is a ccache-wrapped compiler.
118 Release date: 2014-10-19
121 New features and improvements
122 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 - Added support for the `-Xclang` compiler option.
126 - Improved handling of exit code of internally executed processes.
128 - Zero length object files in the cache are now rejected as invalid.
130 - Bail out on option `-gsplit-dwarf` (since it produces multiple output files).
132 - Compiler option `-fdebug-prefix-map` is now ignored (not part of the hash).
133 (The `-fdebug-prefix-map` option may be used in combination with
134 `CCACHE_BASEDIR` to reuse results across different directories.)
136 - Added note in documentation that `--ccache-skip` currently does not mean
137 ``don't hash the following option''.
139 - To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also
140 needs to include the new `pch_defines` sloppiness. This is because ccache
141 can't detect changes in the source code when only defined macros have been
144 - Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now
145 cleaned up if they are older than one hour.
151 - Fixed path canonicalization in `make_relative_path()` when path doesn't
154 - Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR`
157 - ccache no longer tries to create the cache directory when `CCACHE_DISABLE` is
160 - Fixed bug when reading manifests with a very large number of file info
163 - Fixed problem with logging of current working directory.
168 Release date: 2013-01-06
174 - The EAGAIN signal is now handled correctly when emitting cached stderr
175 output. This fixes a problem triggered by large error outputs from the
178 - Subdirectories in the cache are no longer created in read-only mode.
180 - Fixed so that ccache's log file descriptor is not made available to the
183 - Improved error reporting when failing to create temporary stdout/stderr files
184 when executing the compiler.
186 - Disappearing temporary stdout/stderr files are now handled gracefully.
192 - Fixed test suite to work on ecryptfs.
197 Release date: 2012-08-11
200 New features and improvements
201 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
203 - Made paths to dependency files relative in order to increase cache hits.
205 - Added work-around to make ccache work with buggy GCC 4.1 when creating a
208 - Clang plugins are now hashed to catch plugin upgrades.
214 - Fixed crash when the current working directory has been removed.
216 - Fixed crash when stderr is closed.
218 - Corrected a corner case when parsing backslash escapes in string
221 - Paths are now correctly canonicalized when computing paths relative to the
228 - Made git version macro work when compiling outside of the source directory.
230 - Fixed `static_assert` macro definition clash with GCC 4.7.
235 Release date: 2012-01-08
241 - Non-writable `CCACHE_DIR` is now handled gracefully when `CCACHE_READONLY` is
244 - Made failure to create files (typically due to bad directory permissions) in
245 the cache directory fatal. Previously, such failures were silently and
246 erroneously flagged as "compiler produced stdout".
248 - Both the `-specs=file` and `--specs=file` forms are now recognized.
250 - Added recognition and hashing of GCC plugins specified with `-fplugin=file`.
252 - `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs files
255 - Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the hash
256 to avoid false cache hits when such variables have changed.
258 - Corrected log message when unify mode is enabled.
260 - Reverted the GCC bug compatibility introduced in ccache 3.1.5 for `-MT`/`-MQ`
261 options with concatenated arguments. (The bug is fixed in recent GCC
268 - Corrected license header for `mdfour.c`.
270 - Improved documentation on how to fix bad object files in the cache.
276 Release date: 2011-08-21
279 New features and improvements
280 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282 - Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used.
288 - Don't crash if `getcwd()` fails.
290 - Fixed alignment of ``called for preprocessing'' counter.
295 Release date: 2011-05-29
298 New features and improvements
299 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301 - Added a new statistics counter named ``called for preprocessing''.
303 - The original command line is now logged to the file specified with
306 - Improved error logging when system calls fail.
308 - Added support for rewriting absolute paths in `-F`/`-iframework` GCC
311 - Improved order of statistics counters in `ccache -s` output.
317 - The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled
318 correctly when they are last on the command line.
320 - ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with
321 concatenated arguments.
323 - Fixed a minor memory leak.
325 - Systems that lack (and don't need to be linked with) libm are now supported.
330 Release date: 2011-01-09
336 - Made a work-around for a bug in `gzputc()` in zlib 1.2.5.
338 - Corrupt manifest files are now removed so that they won't block direct mode
341 - ccache now copes with file systems that don't know about symbolic links.
343 - The file handle in now correctly closed on write error when trying to create
349 Release date: 2010-11-28
355 - The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between
356 option and argument) are now handled correctly.
362 - Portability fixes for HP-UX 11.00 and other esoteric systems.
367 Release date: 2010-11-21
373 - Bail out on too hard compiler options `-fdump-*`.
375 - NULL return values from malloc/calloc of zero bytes are now handled
378 - Fixed issue when parsing precompiler output on AIX.
384 - Improved documentation on which information is included in the hash sum.
386 - Made the ``too new header file'' test case work on file systems with
387 unsynchronized clocks.
389 - The test suite now also works on systems that lack a /dev/zero.
394 Release date: 2010-11-07
400 - ccache now falls back to preprocessor mode when a non-regular include file
401 (device, socket, etc) has been detected so that potential hanging due to
402 blocking reads is avoided.
404 - CRC errors are now detected when decompressing compressed files in the cache.
406 - Fixed potential object file corruption race on NFS.
408 - Minor documentation corrections.
410 - Fixed configure detection of ar.
412 - ccache development version (set by dev.mk) now works with gits whose
413 `describe` command doesn't understand `--dirty`.
419 - Minor debug log message improvements.
424 Release date: 2010-09-16
427 New features and improvements
428 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
430 - Added support for hashing the output of a custom command (e.g. `%compiler%
431 --version`) to identify the compiler instead of stat-ing or hashing the
432 compiler binary. This can improve robustness when the compiler (as seen by
433 ccache) actually isn't the real compiler but another compiler wrapper.
435 - Added support for caching compilations that use precompiled headers. (See the
436 manual for important instructions regarding this.)
438 - Locking of the files containing statistics counters is now done using
439 symlinks instead of POSIX locks. This should make ccache behave a lot better
440 on file systems where POSIX locks are slow or broken (e.g. NFS on some
443 - Manifest files are now updated without the need of taking locks.
445 - Updates of statistics counters are now always done in one of the sub-level
446 statistics files. This reduces lock contention, which especially improves
447 performance on slow NFS mounts.
449 - Reading and writing of statistics counters has been made forward-compatible
450 (unknown counters are retained).
452 - Files are now read without using `mmap()`. This has two benefits: it's more
453 robust against file changes during reading and it improves performance on
454 poor systems where `mmap()` doesn't use the disk cache.
456 - Added `.cp` and `.CP` as known C++ suffixes.
460 - Added `-install_name` as an option known to take an argument. (This improves
461 statistics when using the Darwin linker.)
467 - Non-fatal error messages are now never printed to stderr but logged instead.
469 - Fixed a bug affecting failing commands when `--ccache-skip` is used.
471 - Made `--ccache-skip` work for all options.
473 - EINTR is now handled correctly.
479 - Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The
480 port is not yet finished, but will hopefully be complete in some subsequent
483 - Added a `--nostats` flag to the performance benchmark program.
485 - Made the performance benchmark program more accurate when measuring cache
488 - Added a new test framework for unit tests written in C.
490 - Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` presence.
492 - Improved documentation on how to combine ccache with other compiler wrappers
495 - New `LICENSE.txt` file with licensing and copyright details about bundled
498 - New `AUTHORS.txt` file with a list of ccache contributors.
500 - New `HACKING.txt` file with some notes about ccache code conventions.
505 Release date: 2010-07-15
511 - The statistics counter ``called for link'' is now correctly updated when
512 linking with a single object file.
514 - Fixed a problem with out-of-source builds.
519 Release date: 2010-06-20
525 - ccache is now licensed under the GNU General Public License (GPL) version 3
532 - The way the hashes are calculated has changed, so you won't get cache hits
533 for compilation results stored by older ccache versions. Because of this, you
534 might as well clear the old cache directory with `ccache --clear` if you
535 want, unless you plan to keep using an older ccache version.
538 New features and improvements
539 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
541 - ccache now has a ``direct mode'' where it computes a hash of the source code
542 (including all included files) and compiler options without running the
543 preprocessor. By not running the preprocessor, CPU usage is reduced; the
544 speed is somewhere between 1 and 5 times that of ccache running in
545 traditional mode, depending on the circumstances. The speedup will be higher
546 when I/O is fast (e.g., when files are in the disk cache). The direct mode
547 can be disabled by setting +CCACHE_NODIRECT+.
549 - Support has been added for rewriting absolute paths to relative paths when
550 hashing, in order to increase cache hit rate when building the same source
551 code in different directories even when compiling with `-g` and when using
552 absolute include directory paths. This is done by setting the
553 `CCACHE_BASEDIR` environment variable to an absolute path that specifies
554 which paths to rewrite.
556 - Object files are now optionally stored compressed in the cache. The runtime
557 cost is negligible, and more files will fit in the ccache directory and in
558 the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note
559 that you can't use compression in combination with the hard link feature.
561 - A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what
562 compiler-identifying information to hash to ensure that results retrieved
563 from the cache are accurate. Possible values are: none (don't hash anything),
564 mtime (hash the compiler's mtime and size) and content (hash the content of
565 the compiler binary). The default is mtime.
567 - It is now possible to specify extra files whose contents should be included
568 in the hash sum by setting the `CCACHE_EXTRAFILES` option.
570 - Added support for Objective-C and Objective-C\+\+. The statistics counter
571 ``not a C/C++ file'' has been renamed to ``unsupported source language''.
573 - Added support for the `-x` compiler option.
575 - Added support for long command-line options.
577 - A `CACHEDIR.TAG` file is now created in the cache directory. See
578 <http://www.brynosaurus.com/cachedir/>.
580 - Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have been
583 - You can relax some checks that ccache does in direct mode by setting
584 `CCACHE_SLOPPINESS`. See the manual for more information.
586 - `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as
589 - The default value of `CCACHE_TEMPDIR` has been changed to `$CCACHE_DIR/tmp`
590 to avoid cluttering the top directory.
592 - Temporary files that later will be moved into the cache are now created in
593 the cache directory they will end up in. This makes ccache more friendly to
594 Linux's directory layout.
596 - Improved the test suite and added tests for most of the new functionality.
597 It's now also possible to specify a subset of tests to run.
599 - Standard error output from the compiler is now only stored in the cache if
602 - If the compiler produces no object file or an empty object file, but gives a
603 zero exit status (could be due to a file system problem, a buggy program
604 specified by `CCACHE_PREFIX`, etc.), ccache copes with it properly.
606 - Added `installcheck` and `distcheck` make targets.
608 - Clarified cache size limit options' and cleanup semantics.
610 - Improved display of cache max size values.
612 - The following options are no longer hashed in the preprocessor mode:
613 `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, `-iwithprefix`,
614 `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and `-U`.
620 - Various portability improvements.
622 - Improved detection of home directory.
624 - User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile.
628 - Computation of the hash sum has been improved to decrease the risk of hash
629 collisions. For instance, the compiler options `-X -Y` and `-X-Y` previously
630 contributed equally to the hash sum.
632 - Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`,
633 `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and
634 `-save-temps`. Also bail out on `@file` style options.
636 - Errors when using multiple `-arch` compiler options are now noted as
637 ``unsupported compiler option''.
639 - `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.
641 - The `-finput-charset` option is now handled correctly.
643 - Added support for `-Wp,-MD` and `-Wp,-MMD` options.
645 - The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly
646 recognized as taking an argument.
648 - Debug information containing line numbers of predefined and command-line
649 macros (enabled with the compiler option `-g3`) will now be correct.
651 - Corrected LRU cleanup handling of object files.
653 - `utimes()` is now used instead of `utime()` when available.
655 - Non-writable cache directories are now handled gracefully.
657 - Corrected documentation about sharing the cache directory.
659 - Fixed compilation warnings from GCC 4.3.
661 - The command specified by `CCACHE_PREFIX` is no longer part of the hash.
663 - Fixed bad memory access spotted by Valgrind.
665 - Fixed a bug in `x_realloc`.
667 - Freed memory is no longer referenced when compiling a `.i`/`.ii` file and
668 falling back to running the real compiler.
670 - The test suite is now immune to external values of the `CCACHE_*` environment
673 - Improved detection of recursive invocation.
675 - The ccache binary is now not unconditionally stripped when installing.
677 - Statistics counters are now correctly updated for -E option failures and