Changes
~~~~~~~
-* Fixed crash when the debug mode is enabled and the output file is in a
+- Fixed crash when the debug mode is enabled and the output file is in a
non-writable directory, e.g. when the output file is `/dev/null`.
-* Fixed an issue when printing very large log messages to the debug log.
+- Fixed an issue when printing very large log messages to the debug log.
-* Fixed bugs related to support for `-gsplit-dwarf`. Previously ccache could
+- Fixed bugs related to support for `-gsplit-dwarf`. Previously ccache could
produce an incorrect link to the `.dwo` file in the `.o` file.
-* Compilations with /dev/null as the input file are now cached.
+- Compilations with /dev/null as the input file are now cached.
-* ccache now knows how to contruct the object filename if no `-o` option is
+- ccache now knows how to contruct the object filename if no `-o` option is
given and the source filename does not include a `.` or ends with a `.`.
-* Fixed a bug in the depend mode where the last couple of include files in the
+- Fixed a bug in the depend mode where the last couple of include files in the
`.d` file was not taken into account.
-* Fixed a temporary file leak when the depend mode is enabled and the compiler
+- Fixed a temporary file leak when the depend mode is enabled and the compiler
produces standard error output.
-* Fixed a bug in the depend mode where a manifest hash only could be associated
+- Fixed a bug in the depend mode where a manifest hash only could be associated
with one set of header dependencies.
-* Manifest files did not get marked as used on direct cache hits, so the LRU
+- Manifest files did not get marked as used on direct cache hits, so the LRU
cache cleanup would incorrectly remove them eventually. This has now been
fixed.
-* The rewriting of absolute paths into relative paths in the dependency file is
+- The rewriting of absolute paths into relative paths in the dependency file is
now enabled in the depend mode as well.
-* ccache now ignores unknown keys in configuration files.
+- ccache now ignores unknown keys in configuration files.
-* Rearranged command-line options into sections in the help text.
+- Rearranged command-line options into sections in the help text.
-* Documented the previously undocumented `--dump-manifest` and `--hash-file`
+- Documented the previously undocumented `--dump-manifest` and `--hash-file`
options (only useful for debugging ccache itself).
-* Added missing documentation for the command-line option `-k/--get-config`
+- Added missing documentation for the command-line option `-k/--get-config`
added in ccache 3.5.
-* Renamed the `--print-config` command to `--show-config`.
+- Renamed the `--print-config` command to `--show-config`.
-* Added a new `--print-stats` command that prints statistics counters in
+- Added a new `--print-stats` command that prints statistics counters in
machine-parsable (tab-separated) format.
-* ccache no longer creates a missing output directory, thus mimicking the
+- ccache no longer creates a missing output directory, thus mimicking the
compiler behavior for `-o out/obj.o` when “out” doesn’t exist.
-* `-fdebug-prefix-map=ARG`, `-ffile-prefix-map=ARG` and
+- `-fdebug-prefix-map=ARG`, `-ffile-prefix-map=ARG` and
`-fmacro-prefix-map=ARG` are now included in the hash, but only the part
before “ARG”. This fixes a bug where compiler feature detection of said flags
would not work correctly with ccache.
-* Bail out on too hard compiler option `-gtoggle`.
+- Bail out on too hard compiler option `-gtoggle`.
-* Improved debug logging of file hashes in depend mode.
+- Improved debug logging of file hashes in depend mode.
-* Improved handling of various `-g*` options. In particular, ccache now
+- Improved handling of various `-g*` options. In particular, ccache now
understands that `-g0` cancels out previous `-g* options`.
Changes
~~~~~~~
-- ccache now has an opt-in ``depend mode''. When enabled, ccache never executes
+- ccache now has an opt-in “depend mode”. When enabled, ccache never executes
the preprocessor, which results in much lower cache miss overhead at the
expense of a lower potential cache hit rate. The depend mode is only possible
to use when the compiler option `-MD` or `-MMD` is used.
-- Added support for GCC's `-ffile-prefix-map` option. The `-fmacro-prefix-map`
+- Added support for GCC’s `-ffile-prefix-map` option. The `-fmacro-prefix-map`
option is now also skipped from the hash.
- Added support for multiple `-fsanitize-blacklist` arguments.
- A new sloppiness setting `clang_index_store` makes ccache skip the Clang
compiler option `-index-store-path` and its argument when computing the
manifest hash. This is useful if you use Xcode, which uses an index store
- path derived from the local project path. Note that the index store won't be
+ path derived from the local project path. Note that the index store won’t be
updated correctly on cache hits if you enable this option.
- Rename sloppiness `no_system_headers` to `system_headers` for consistency
supported correctly.
- The algorithm that scans for `__DATE_` and `__TIME__` tokens in the hashed
- source code now doesn't produce false positives for tokens where `__DATE__`
+ source code now doesn’t produce false positives for tokens where `__DATE__`
or `__TIME__` is a substring.
- Added a boolean `debug` (`CCACHE_DEBUG`) configuration option. When enabled,
ccache will create per-object debug files that are helpful e.g. when
- debugging unexpected cache misses. See also the new ``Cache debugging''
- section in the manual.
+ debugging unexpected cache misses. See also the new “Cache debugging” section
+ in the manual.
- Renamed `CCACHE_CC` to `CCACHE_COMPILER` (keeping the former as a deprecated
alias).
- Improved performance substantially when using `hash_dir = false` on platforms
like macOS where `getcwd()` is slow.
-- Added ``stats updated'' timestamp in `ccache -s` output. This can be useful
- if you wonder whether ccache actually was used for your last build.
+- Added “stats updated” timestamp in `ccache -s` output. This can be useful if
+ you wonder whether ccache actually was used for your last build.
-- Renamed ``stats zero time'' to ``stats zeroed'' and documented it. The
- counter is also now only present in `ccache -s` output when `ccache -z`
- actually has been called.
+- Renamed “stats zero time” to “stats zeroed” and documented it. The counter is
+ also now only present in `ccache -s` output when `ccache -z` actually has
+ been called.
- The content of the `-fsanitize-blacklist` file is now included in the hash,
so updates to the file will now correctly result in separate cache entries.
-- It's now possible to opt out of building and installing man pages when
+- It’s now possible to opt out of building and installing man pages when
running `make install` in the source repository.
-- If the compiler type can't be detected (e.g. if it is named `cc`), use safer
- defaults that won't trip up Clang.
+- If the compiler type can’t be detected (e.g. if it is named `cc`), use safer
+ defaults that won’t trip up Clang.
- Made the ccache test suite work on FreeBSD.
triggered at the same time, in extreme cases trimming the cache to a much
smaller size than the configured limits.
-- Correctly hash preprocessed headers located in a ``.gch directory''.
+- Correctly hash preprocessed headers located in a “.gch directory”.
Previously, ccache would not pick up changes to such precompiled headers,
risking false positive cache hits.
- Fixed build failure when using the bundled zlib sources.
- ccache 3.3.5 added a workaround for not triggering Clang errors when a
- precompiled header's dependency has an updated timestamp (but identical
+ precompiled header’s dependency has an updated timestamp (but identical
content). That workaround is now only applied when the compiler is Clang.
- Made it possible to perform out-of-source builds in dev mode again.
- Added support for caching `.su` files generated by GCC flag `-fstack-usage`.
-- ccache should now work with distcc's ``pump'' wrapper.
+- ccache should now work with distcc’s “pump” wrapper.
- The optional unifier is no longer disabled when the direct mode is enabled.
- Boolean environment variable settings no longer accept the following
(case-insensitive) values: `0`, `false`, `disable` and `no`. All other values
- are accepted and taken to mean ``true''. This is to stop users from setting
+ are accepted and taken to mean “true”. This is to stop users from setting
e.g. `CCACHE_DISABLE=0` and then expect the cache to be used.
- Improved support for `run_second_cpp = false`: If combined with passing
- An implicit `-MQ` is now passed to the preprocessor only if the object file
extension is non-standard. This should make it easier to use EDG-based
- compilers (e.g. GHS) which don't understand `-MQ`.
+ compilers (e.g. GHS) which don’t understand `-MQ`.
- ccache now treats an unreadable configuration file just like a missing
configuration file.
~~~~~~~~~
- Fixed a regression where the original order of debug options could be lost.
- This reverts the ``Improved parsing of `-g*` options'' feature in ccache 3.3.
+ This reverts the “Improved parsing of `-g*` options” feature in ccache 3.3.
- Multiple `-fdebug-prefix-map` options should now be handled correctly.
- `ccache -c/--cleanup` now works like documented: it just recalculates size
counters and trims the cache to not exceed the max size and file number
- limits. Previously, the forced cleanup took ``limit_multiple'' into account,
- so that `ccache -c/--cleanup` by default would trim the cache to 80% of the
- max limit.
+ limits. Previously, the forced cleanup took “limit_multiple” into account, so
+ that `ccache -c/--cleanup` by default would trim the cache to 80% of the max
+ limit.
- ccache no longer ignores linker arguments for Clang since Clang warns about
them.
- Fixed a regression in ccache 3.3 related to potentially bad content of
dependency files when compiling identical source code but with different
source paths. This was only partially fixed in 3.3.2 and reverts the new
- ``Names of included files are no longer included in the hash of the
- compiler's preprocessed output'' feature in 3.3.
+ “Names of included files are no longer included in the hash of the compiler’s
+ preprocessed output” feature in 3.3.
- Corrected statistics counter for `-optf`/`--options-file` failure.
Bug fixes
~~~~~~~~~
-- Fixed a problem in the ``multiple `-arch` options'' support introduced in
- 3.3. When using the direct mode (the default), different combinations of
- `-arch` options were not detected properly.
+- Fixed a problem in the “multiple `-arch` options” support introduced in 3.3.
+ When using the direct mode (the default), different combinations of `-arch`
+ options were not detected properly.
- Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The configuration option `run_second_cpp` (`CCACHE_CPP2`) now defaults to
- true. This improves ccache's out-of-the-box experience for compilers that
- can't compile their own preprocessed output with the same outcome as if they
+ true. This improves ccache’s out-of-the-box experience for compilers that
+ can’t compile their own preprocessed output with the same outcome as if they
compiled the real source code directly, e.g. newer versions of GCC and Clang.
- The configuration option `hash_dir` (`CCACHE_HASHDIR`) now defaults to true.
- Added a new statistics counter that tracks the number of performed cleanups
due to the cache size being over the limit. The value is shown in the output
- of ``ccache -s''.
+ of “ccache -s”.
- Added support for relocating debug info directory using `-fdebug-prefix-map`.
This allows for cache hits even when `hash_dir` is used in combination with
`base_dir`.
-- Added a new ``cache hit rate'' field to the output of ``ccache -s''.
+- Added a new “cache hit rate” field to the output of “ccache -s”.
-- Added support for caching compilation of assembler code produced by e.g.
- ``gcc -S file.c''.
+- Added support for caching compilation of assembler code produced by e.g. “gcc
+ -S file.c”.
- Added support for cuda including the -optf/--options-file option.
- ccache now understands the undocumented `-coverage` (only one dash) GCC
option.
-- Names of included files are no longer included in the hash of the compiler's
+- Names of included files are no longer included in the hash of the compiler’s
preprocessed output. This leads to more potential cache hits when not using
the direct mode.
- Fixed a bug which could lead to false cache hits for compiler command lines
with a missing argument to an option that takes an argument.
-- ccache now knows how to work around a glitch in the output of GCC 6's
+- ccache now knows how to work around a glitch in the output of GCC 6’s
preprocessor.
Bug fixes
~~~~~~~~~
-- Fixed build problem on QNX, which lacks ``SA_RESTART''.
+- Fixed build problem on QNX, which lacks “SA_RESTART”.
- Bail out on compiler option `-fstack-usage` since it creates a `.su` file
- which ccache currently doesn't handle.
+ which ccache currently doesn’t handle.
- Fixed a bug where (due to ccache rewriting paths) the compiler could choose
incorrect include files if `CCACHE_BASEDIR` is used and the source file path
- Improved handling of stale NFS handles.
-- Made it harder to misinterpret documentation of boolean environment settings'
+- Made it harder to misinterpret documentation of boolean environment settings’
semantics.
- Fixed failure to create directories on QNX.
-- Don't (try to) update manifest file in ``read-only'' and ``read-only direct''
+- Don’t (try to) update manifest file in “read-only” and “read-only direct”
modes.
-- Fixed a bug in caching of `stat` system calls in ``file_stat_matches
- sloppiness mode''.
+- Fixed a bug in caching of `stat` system calls in “file_stat_matches
+ sloppiness mode”.
- Fixed bug in hashing of Clang plugins, leading to unnecessary cache misses.
-- Fixed --print-config to show ``pch_defines sloppiness''.
+- Fixed --print-config to show “pch_defines sloppiness”.
-- The man page is now built when running ``make install'' from Git repository
+- The man page is now built when running “make install” from Git repository
sources.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Added support for `CCACHE_COMPILERCHECK=string:<value>`. This is a faster
- alternative to `CCACHE_COMPILERCHECK=<command>` if the command's output can
+ alternative to `CCACHE_COMPILERCHECK=<command>` if the command’s output can
be precalculated by the build system.
- Add support for caching code coverage results (compiling for gcov).
This makes it possible to rebuild with `CCACHE_CPP2` set without having to
clear the cache to get new results.
-- Don't try to reset a nonexistent stats file. This avoids ``No such file or
- directory'' messages in the ccache log when the cache directory doesn't
- exist.
+- Don’t try to reset a nonexistent stats file. This avoids “No such file or
+ directory” messages in the ccache log when the cache directory doesn’t exist.
- Fixed a bug where ccache deleted Clang diagnostics after compiler failures.
- Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
- The `-c` option is no longer passed to the preprocessor. This fixes problems
- with Clang and Solaris's C++ compiler.
+ with Clang and Solaris’s C++ compiler.
- ccache no longer passes preprocessor options like `-D` and `-I` to the
compiler when compiling preprocessed output. This fixes warnings emitted by
- Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
`-fbranch-probabilities` are now handled without bailing.
-- Added support for Clang's `--serialize-diagnostic` option, storing the
+- Added support for Clang’s `--serialize-diagnostic` option, storing the
diagnostic file (`.dia`) in the cache.
- Added support for precompiled headers when using Clang.
the other way around. This is needed to support compiler options like
`-fprofile-arcs` and `--serialize-diagnostics`.
-- ccache now checks that included files' ctimes aren't too new. This check can
- be turned off by adding `include_file_ctime` to the ``ccache sloppiness''
+- ccache now checks that included files’ ctimes aren’t too new. This check can
+ be turned off by adding `include_file_ctime` to the “ccache sloppiness”
setting.
- Added possibility to get cache hits based on filename, size, mtime and ctime
only. On other words, source code files are not even read, only stat-ed. This
- operation mode is opt-in by adding `file_stat_matches` to the ``ccache
- sloppiness'' setting.
+ operation mode is opt-in by adding `file_stat_matches` to the “ccache
+ sloppiness” setting.
- The filename part of options like `-Wp,-MDfilename` is no longer included in
- the hash since the filename doesn't have any bearing on the result.
+ the hash since the filename doesn’t have any bearing on the result.
-- Added a ``read-only direct'' configuration setting, which is like the
- ordinary read-only setting except that ccache will only try to retrieve
- results from the cache using the direct mode, not the preprocessor mode.
+- Added a “read-only direct” configuration setting, which is like the ordinary
+ read-only setting except that ccache will only try to retrieve results from
+ the cache using the direct mode, not the preprocessor mode.
- The display and interpretation of cache size has been changed to use SI
units.
- Added support for `@file` and `-@file` arguments (reading options from a
file).
-- `-Wl,` options are no longer included in the hash since they don't affect
+- `-Wl,` options are no longer included in the hash since they don’t affect
compilation.
- Bail out on too hard compiler option `-Wp,-P`.
This makes it possible to rebuild with `CCACHE_CPP2` set without having to
clear the cache to get new results.
-- Don't try to reset a nonexistent stats file. This avoids ``No such file or
- directory'' messages in the ccache log when the cache directory doesn't
- exist.
+- Don’t try to reset a nonexistent stats file. This avoids “No such file or
+ directory” messages in the ccache log when the cache directory doesn’t exist.
ccache 3.1.10
`CCACHE_BASEDIR` to reuse results across different directories.)
- Added note in documentation that `--ccache-skip` currently does not mean
- ``don't hash the following option''.
+ “don’t hash the following option”.
- To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also
needs to include the new `pch_defines` sloppiness. This is because ccache
- can't detect changes in the source code when only defined macros have been
+ can’t detect changes in the source code when only defined macros have been
changed.
- Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now
Bug fixes
~~~~~~~~~
-- Fixed path canonicalization in `make_relative_path()` when path doesn't
+- Fixed path canonicalization in `make_relative_path()` when path doesn’t
exist.
- Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR`
- Subdirectories in the cache are no longer created in read-only mode.
-- Fixed so that ccache's log file descriptor is not made available to the
+- Fixed so that ccache’s log file descriptor is not made available to the
compiler.
- Improved error reporting when failing to create temporary stdout/stderr files
Bug fixes
~~~~~~~~~
-- Don't crash if `getcwd()` fails.
+- Don’t crash if `getcwd()` fails.
-- Fixed alignment of ``called for preprocessing'' counter.
+- Fixed alignment of “called for preprocessing” counter.
ccache 3.1.5
New features and enhancements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Added a new statistics counter named ``called for preprocessing''.
+- Added a new statistics counter named “called for preprocessing”.
- The original command line is now logged to the file specified with
`CCACHE_LOGFILE`.
- Fixed a minor memory leak.
-- Systems that lack (and don't need to be linked with) libm are now supported.
+- Systems that lack (and don’t need to be linked with) libm are now supported.
ccache 3.1.4
- Made a work-around for a bug in `gzputc()` in zlib 1.2.5.
-- Corrupt manifest files are now removed so that they won't block direct mode
+- Corrupt manifest files are now removed so that they won’t block direct mode
hits.
-- ccache now copes with file systems that don't know about symbolic links.
+- ccache now copes with file systems that don’t know about symbolic links.
- The file handle in now correctly closed on write error when trying to create
a cache dir tag.
- Improved documentation on which information is included in the hash sum.
-- Made the ``too new header file'' test case work on file systems with
+- Made the “too new header file” test case work on file systems with
unsynchronized clocks.
- The test suite now also works on systems that lack a /dev/zero.
- Fixed configure detection of ar.
- ccache development version (set by dev.mk) now works with gits whose
- `describe` command doesn't understand `--dirty`.
+ `describe` command doesn’t understand `--dirty`.
Other
- Added support for hashing the output of a custom command (e.g. `%compiler%
--version`) to identify the compiler instead of stat-ing or hashing the
compiler binary. This can improve robustness when the compiler (as seen by
- ccache) actually isn't the real compiler but another compiler wrapper.
+ ccache) actually isn’t the real compiler but another compiler wrapper.
- Added support for caching compilations that use precompiled headers. (See the
manual for important instructions regarding this.)
- Reading and writing of statistics counters has been made forward-compatible
(unknown counters are retained).
-- Files are now read without using `mmap()`. This has two benefits: it's more
+- Files are now read without using `mmap()`. This has two benefits: it’s more
robust against file changes during reading and it improves performance on
- poor systems where `mmap()` doesn't use the disk cache.
+ poor systems where `mmap()` doesn’t use the disk cache.
- Added `.cp` and `.CP` as known C++ suffixes.
Bug fixes
~~~~~~~~~
-- The statistics counter ``called for link'' is now correctly updated when
+- The statistics counter “called for link” is now correctly updated when
linking with a single object file.
- Fixed a problem with out-of-source builds.
Upgrade notes
~~~~~~~~~~~~~
-- The way the hashes are calculated has changed, so you won't get cache hits
+- The way the hashes are calculated has changed, so you won’t get cache hits
for compilation results stored by older ccache versions. Because of this, you
might as well clear the old cache directory with `ccache --clear` if you
want, unless you plan to keep using an older ccache version.
New features and enhancements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ccache now has a ``direct mode'' where it computes a hash of the source code
+- ccache now has a “direct mode” where it computes a hash of the source code
(including all included files) and compiler options without running the
preprocessor. By not running the preprocessor, CPU usage is reduced; the
speed is somewhere between 1 and 5 times that of ccache running in
- Object files are now optionally stored compressed in the cache. The runtime
cost is negligible, and more files will fit in the ccache directory and in
the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note
- that you can't use compression in combination with the hard link feature.
+ that you can’t use compression in combination with the hard link feature.
- A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what
compiler-identifying information to hash to ensure that results retrieved
- from the cache are accurate. Possible values are: none (don't hash anything),
- mtime (hash the compiler's mtime and size) and content (hash the content of
+ from the cache are accurate. Possible values are: none (don’t hash anything),
+ mtime (hash the compiler’s mtime and size) and content (hash the content of
the compiler binary). The default is mtime.
- It is now possible to specify extra files whose contents should be included
in the hash sum by setting the `CCACHE_EXTRAFILES` option.
- Added support for Objective-C and Objective-C\+\+. The statistics counter
- ``not a C/C++ file'' has been renamed to ``unsupported source language''.
+ “not a C/C++ file” has been renamed to “unsupported source language”.
- Added support for the `-x` compiler option.
- Temporary files that later will be moved into the cache are now created in
the cache directory they will end up in. This makes ccache more friendly to
- Linux's directory layout.
+ Linux’s directory layout.
- Improved the test suite and added tests for most of the new functionality.
- It's now also possible to specify a subset of tests to run.
+ It’s now also possible to specify a subset of tests to run.
- Standard error output from the compiler is now only stored in the cache if
- it's non-empty.
+ it’s non-empty.
- If the compiler produces no object file or an empty object file, but gives a
zero exit status (could be due to a file system problem, a buggy program
- Added `installcheck` and `distcheck` make targets.
-- Clarified cache size limit options' and cleanup semantics.
+- Clarified cache size limit options’ and cleanup semantics.
- Improved display of cache max size values.
`-save-temps`. Also bail out on `@file` style options.
- Errors when using multiple `-arch` compiler options are now noted as
- ``unsupported compiler option''.
+ “unsupported compiler option”.
- `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.