]> git.ipfire.org Git - thirdparty/ccache.git/blame - doc/NEWS.adoc
chore: Update NEWS
[thirdparty/ccache.git] / doc / NEWS.adoc
CommitLineData
63239e95
JR
1= Ccache news
2
4f571139
JR
3== Ccache 4.9
4
5Release date: 2023-12-30
6
7=== New features and improvements
8
9- Made `ignore_options`/`CCACHE_IGNOREOPTIONS` also skip the option from special
10 processing, similar to how `--ccache-skip` works. +
11 [small]#_[contributed by Joel Rosdahl]_#
12
13- Added support for expanding environment variables references in all
14 configuration options. +
15 [small]#_[contributed by Joel Rosdahl]_#
16
17- MSVC options `/Fd`, `/FS` and `/MP` are no longer included in the input hash. +
18 [small]#_[contributed by Huang Qin Jing]_#
19
20- Made ccache terminate an ongoing compiler subprocess when terminated on all
21 platforms, not only on Unix. +
22 [small]#_[contributed by Andreas Reischuck]_#
23
24- Added support for multiple `-Xarch_*` arguments matching `-arch`. +
25 [small]#_[contributed by Tadej Novak]_#
26
27- Added a `debug_level`/`CCACHE_DEBUGLEVEL` configuration option, making it
28 possible to tell ccache to only write a log file for each compilation, not
29 other debug files. +
30 [small]#_[contributed by an anonymous user]_#
31
32- Added `max_cache_size_kibibyte` and `max_files_in_cache` fields in output from
33 `ccache --print-stats`. +
34 [small]#_[contributed by Joel Rosdahl]_#
35
36- Paths after `-Xclang -include` are now rewritten to relative paths if
37 `base_dir`/`CCACHE_BASEDIR` is in effect. +
38 [small]#_[contributed by Jiulong Wang]_#
39
40- Added support for `clang --analyze`. +
41 [small]#_[contributed by an anonymous user]_#
42
43- Improved processing of input file arguments. +
44 [small]#_[contributed by Joel Rosdahl]_#
45
46- Added support for `st_Xtimensec` fields in `struct stat`, thus improving
47 behavior on some BSDs when using newly created include files. +
48 [small]#_[contributed by Joel Rosdahl]_#
49
50- Added support for the undocumented GCC/Clang option `--include`. +
51 [small]#_[contributed by Joel Rosdahl]_#
52
53
54=== Bug fixes
55
56- Ccache now exits more gracefully on invalid sharded remote storage URLs. +
57 [small]#_[contributed by Joel Rosdahl]_#
58
59- Made ccache bail out on too hard options `-fmodules-ts`, `-fmodule-header`,
60 `-wrapper` and `-Xclang -ast-dump`. +
61 [small]#_[contributed by Joel Rosdahl]_#
62
63- Stopped relying on the `st_blocks` field in `struct stat` since it cannot be
64 trusted for filesystems such as ZFS that do transparent compression or
65 deduplication and adjust `st_blocks` some time in the future. +
66 [small]#_[contributed by Joel Rosdahl]_#
67
68- Fixed crash on Windows for paths with only a drive letter. +
69 [small]#_[contributed by Martin Blanchard]_#
70
71- Made handling of Clang config options (such as `--config-system-dir`) more
72 robust. +
73 [small]#_[contributed by Joel Rosdahl]_#
74
75- Fixed compiler type detection when compiler is a symlink called "`clang-cl`". +
76 [small]#_[contributed by an anonymous user]_#
77
78- Made sure to use MSVC logic for `clang-cl` when handling a precompiled
79 header. +
80 [small]#_[contributed by an anonymous user]_#
81
82- Generalized expansion of remote storage URLs with sharding, for instance
83 making it possible to shard on port number. +
84 [small]#_[contributed by Joel Rosdahl]_#
85
86
87=== Build improvements
88
89- Upgraded to xxHash 0.8.2, thereby fixing an error when compiling ccache with
90 `-Og`. +
91 [small]#_[contributed by Joel Rosdahl]_#
92
93- Fixed sign-compare warning in `src/InodeCache.cpp` on FreeBSD. +
94 [small]#_[contributed by Joel Rosdahl]_#
95
96- Fixed the CMake option `STATIC_LINK` on Linux/macOS. +
97 [small]#_[contributed by Rafael Kitover]_#
98
99- Added the CMake option `OFFLINE`, defaulting to the value of the standard
100 variable `FETCHCONTENT_FULLY_DISCONNECTED` (which is OFF by default), to
101 disable downloading anything from the internet. +
102 [small]#_[contributed by Rafael Kitover]_#
103
104- Fixed warnings about unused functions on new MSVC versions. +
105 [small]#_[contributed by Rafael Kitover]_#
106
107- Made sure to set both C and C++ CMake compiler launcher variables if either is
108 set. +
109 [small]#_[contributed by Rafael Kitover]_#
110
111
112=== Documentation improvements
113
114- The manual now mentions that `system_headers` sloppiness is not supported for
115 MSVC. +
116 [small]#_[contributed by Joel Rosdahl]_#
117
118
119=== Test improvements
120
121- Fixed regex in direct.bash. +
122 [small]#_[contributed by Viktor Szépe]_#
123
124
e3e2b296
JR
125== Ccache 4.8.3
126
127Release date: 2023-08-29
128
129=== Bug fixes
130
131- Fixed various problems with parsing of MSVC response file (`.rsp`). +
132 [small]#_[contributed by Jiri Hörner]_#
133
134- Fixed handling of NVCC `-Xcompiler` and `--Werror` options. +
135 [small]#_[contributed by Andrew Hardin]_#
136
137- Fixed bookkeeping of files when hard linking or file cloning is enabled. In
138 ccache 4.8–4.8.2 this could result in incorrect size/count statistics after
139 automatic or explicit cleanup. +
140 [small]#_[contributed by Joel Rosdahl]_#
141
142
143=== Build improvements
144
145- Made a workaround for GCC 12.3 bug 109241 where GCC fails to compile ccache. +
146 [small]#_[contributed by Joel Rosdahl]_#
147
148- Upgraded to xxHash 0.8.2, which fixes compilation of ccache with GCC 12 and
149 `-Og`. +
150 [small]#_[contributed by Joel Rosdahl]_#
151
152
d26e4f06
JR
153== Ccache 4.8.2
154
155Release date: 2023-06-12
156
157
158=== Bug fixes
159
160- Fixed parsing of Windows drive letter in file URLs for remote storage. +
161 [small]#_[contributed by Joel Rosdahl]_#
162
163- Fixed a bug affecting depend mode with MSVC. +
164 [small]#_[contributed by Huang Qin Jin]_#
165
166- Ccache no longer passes `-v` to the preprocessor. This improves preprocessor
167 mode hit rate when `-v` is on the compiler command line. +
168 [small]#_[contributed by Joel Rosdahl]_#
169
170- Made `--trim-max-size` accept 0 for no limit. +
171 [small]#_[contributed by Joel Rosdahl]_#
172
173
174=== Build improvements
175
176- Made various fixes for Windows 64-bit MSBuild builds. +
177 [small]#_[contributed by Rafael Kitover]_#
178
179- Silenced CMake warning for extracted timestamps. +
180 [small]#_[contributed by Rafael Kitover]_#
181
182- Worked around problem with building ZStandard with Xcode. +
183 [small]#_[contributed by Gregor Jasny]_#
184
185- Fixed undefined behavior (only triggered by unit tests) in
186 `util::read_file_part` for zero count, making the build fail with
187 `+_GLIBCXX_ASSERTIONS+`. +
188 [small]#_[contributed by Joel Rosdahl]_#
189
190
191=== Documentation improvements
192
193- Clarified `--evict-older-than` semantics. +
194 [small]#_[contributed by Joel Rosdahl]_#
195
196
197=== Test improvements
198
199- Fixed typo in "`Directory is not hashed if using -gz`" test. +
200 [small]#_[contributed by Sam James]_#
201
202
268b58c3
JR
203== Ccache 4.8.1
204
205Release date: 2023-05-19
206
207
208=== Bug fixes
209
210- Fixed an issue with the depend mode in combination with `--` on the command
211 line for Clang-based compilers. +
212 [small]#_[contributed by Joel Rosdahl]_#
213
214- Improved knowledge about MSVC debug flags so that non-debug `/Z*` options are
215 once again supported. +
216 [small]#_[contributed by Stephan Rohmen]_#
217
218- Ccache no longer treats `/Zi` as unsupported for clang-cl. +
219 [small]#_[contributed by Tobias Hieta]_#
220
221- Made the output format of `ccache -k max_size` parsable by ccache itself. +
222 [small]#_[contributed by Joel Rosdahl]_#
223
224
225=== Build/CI improvements
226
227- Corrected ccache version in the macOS binary release. +
228 [small]#_[contributed by Joel Rosdahl]_#
229
230- Made it possible to build ccache with clang-cl on Windows. +
231 [small]#_[contributed by Tobias Hieta]_#
232
233- Upgraded to doctest 2.4.11, thereby fixing a build issue on Solaris. +
234 [small]#_[contributed by Joel Rosdahl]_#
235
236
237=== Documentation improvements
238
239- Added a remote file storage example with URL-encoded spaces. +
48028e6e 240 [small]#_[contributed by Joel Rosdahl]_#
268b58c3
JR
241
242
8915a065
JR
243== Ccache 4.8
244
245Release date: 2023-03-12
246
247
248=== New features and improvements
249
250- Improved the automatic cache cleanup mechanism. Automatic cleanups are now
251 performed on 1/256 of the cache instead of 1/16, thus making them much quicker
252 (but naturally more frequent). Cleanups are coordinated between ccache
253 processes so that at most one process will perform cleanup at a time. Also,
254 the actual cache size will stay very close to the configured maximum size
255 instead of staying around 90% as was the case before. +
256 [small]#_[contributed by Joel Rosdahl]_#
257
258- Added support for setting per-compilation configuration options on the command
259 line. Example: `ccache hash_dir=false gcc -c example.c`. +
260 [small]#_[contributed by Joel Rosdahl]_#
261
262- Made it possible to disable ccache for a certain source code file by embedding
263 the string `ccache:disable` in a comment near the top of the file. +
264 [small]#_[contributed by Joel Rosdahl]_#
265
266- Made ccache understand that an MSVC `/Z7` option overrides an earlier `/Z*`
267 option and thus is not too hard to cache. +
268 [small]#_[contributed by Joel Rosdahl]_#
269
270- Added a `--recompress-threads` command line option for selecting the number of
271 CPU threads to use when recompressing the local cache. +
272 [small]#_[contributed by Joel Rosdahl]_#
273
274- Added `--trim-recompress` and `--trim-recompress-threads` command line options
275 for recompressing file-based remote storage. +
276 [small]#_[contributed by Joel Rosdahl]_#
277
278- Added tmpfs, ufs and zfs to the list of supported filesystems on macOS and
279 BSDs for the inode cache. +
280 [small]#_[contributed by Oleg Sidorkin]_#
281
282- Improved progress bars for clean/clear/evict-style operations. +
283 [small]#_[contributed by Joel Rosdahl]_#
284
285- Improved printing of cache sizes in various outputs. +
286 [small]#_[contributed by Joel Rosdahl]_#
287
288- Activate debug logging for command mode options like `--cleanup`. +
289 [small]#_[contributed by Joel Rosdahl]_#
290
291- Added support for `-Wp,-U<macro>` in the direct mode. +
292 [small]#_[contributed by Joel Rosdahl]_#
293
294- Added quotes around arguments with space in logged command lines. +
295 [small]#_[contributed by Joel Rosdahl]_#
296
297- Added logging of executed command lines on Windows. +
298 [small]#_[contributed by Joel Rosdahl]_#
299
300- Made sure not to update the stats file when there are no incremented
301 counters. +
302 [small]#_[contributed by Joel Rosdahl]_#
303
304- Improved actual disk size calculation on Windows. +
305 [small]#_[contributed by Joel Rosdahl]_#
306
307
308=== Build/CI improvements
309
310- Added CI support for building macOS universal binaries. +
311 [small]#_[contributed by Raihaan Shouhell]_#
312
313- Make it possible to force download of Zstd and Hiredis, e.g. with `cmake -D
314 ZSTD_FROM_INTERNET=ON [...]`. +
315 [small]#_[contributed by Joel Rosdahl]_#
316
317
318=== Bug fixes
319
320- Fixed an edge case where a non-temporal identifier is misidentified. +
321 [small]#_[contributed by Erik Flodin]_#
322
323- Fixed reporting of local/remote cache misses in depend mode. +
324 [small]#_[contributed by Joel Rosdahl]_#
325
326- Fixed parsing of backslashes in MSVC RSP files. +
327 [small]#_[contributed by Raihaan Shouhell]_#
328
329- Fixed a crash in `--show-log-stats` when the stats log file doesn't exist. +
330 [small]#_[contributed by Joel Rosdahl]_#
331
332- Fixed matching of base directory for MSVC. The base directory will now match
333 case-insensitively with absolute paths in preprocessed output, or from
334 `/showIncludes` in the depend mode case, when compiling with MSVC. +
335 [small]#_[contributed by Joel Rosdahl]_#
336
337- Fixed a problem where the original umask would be used when storing a remote
338 cache result in the local cache. +
339 [small]#_[contributed by Joel Rosdahl]_#
340
341- Changed the inode cache implementation to use spinlocks instead of pthread
342 mutexes. This makes the inode cache work on FreeBSD and similar systems. +
343 [small]#_[contributed by Oleg Sidorkin]_#
344
345- Don't treat `-Wp,-D` as interchangeable with `-D`. +
346 [small]#_[contributed by Joel Rosdahl]_#
347
348- Disable the inode cache if the filesystem risks getting full soon. This fixes
349 a problem when the cache is on a filesystem where `posix_fallocate` isn't
350 reliable, like Btrfs with compression enabled. +
351 [small]#_[contributed by Joel Rosdahl]_#
352
353- Fixed performance of cache path relativization in preprocessed output,
354 primarily on Windows where `stat` calls are relatively costly. +
355 [small]#_[contributed by Joel Rosdahl]_#
356
357- Fixed rare crash in the signal handler at process exit. +
358 [small]#_[contributed by Joel Rosdahl]_#
359
360- Fixed handling of Unix-style paths passed to MSVC. +
361 [small]#_[contributed by Joel Rosdahl]_#
362
363- Fixed so that the config options and command line are logged before trying to
364 locate the compiler and exiting early. +
365 [small]#_[contributed by Joel Rosdahl]_#
366
367
368=== Documentation improvements
369
370- Improved description of `--set-config`. +
371 [small]#_[contributed by Joel Rosdahl]_#
372
373- Fixed broken markup in the manual. +
374 [small]#_[contributed by Joel Rosdahl]_#
375
376- Added a note to the manual that `stats = false` will disable automatic
377 cleanup. +
378 [small]#_[contributed by Joel Rosdahl]_#
379
380- Fix a bad reference to the "`Remote storage backends`" section. +
381 [small]#_[contributed by Joel Rosdahl]_#
382
383
1519c9aa
JR
384== Ccache 4.7.5
385
386Release date: 2023-03-20
387
388=== Bug fixes
389
390- Disabled the inode cache by default again since there have reports of ccache
391 processes hanging on futex calls related to the inode cache. +
392 [small]#_[contributed by Joel Rosdahl]_#
393
394
1527040b
JR
395== Ccache 4.7.4
396
397Release date: 2022-11-21
398
399
400=== Bug fixes
401
402- Fixed an inode cache race condition. +
403 [small]#_[contributed by Joel Rosdahl]_#
404
405- The default temporary directory is now `$XDG_RUNTIME_DIR/ccache-tmp` instead
406 of a hardcoded `/run/user/<UID>/ccache-tmp`. If `XDG_RUNTIME_DIR` is not set,
407 `<cache_dir>/tmp` is used. This avoids creating `/run/user/<UID>` on systems
408 that don't have it if compiling as root. +
409 [small]#_[contributed by Joel Rosdahl and Oleg Sidorkin]_#
410
411- Added a fallback in case `posix_fallocate` returns `EINVAL` when creating the
412 inode cache file. +
413 [small]#_[contributed by Oleg Sidorkin]_#
414
415- Connection timeout for an HTTP connection is now reported as a timeout instead
416 of an error. +
417 [small]#_[contributed by Joel Rosdahl]_#
418
419- Temporary files found in the cache are no longer counted in
420 `--show-compression`. +
421 [small]#_[contributed by Joel Rosdahl]_#
422
423- Removed duplicate magic header in output from `--inspect`. +
424 [small]#_[contributed by Joel Rosdahl]_#
425
426- Ccache now properly waits for all recompression jobs to finish when there is
427 no `f` subdirectory in the cache. +
428 [small]#_[contributed by Joel Rosdahl]_#
429
430
431=== Other minor improvements
432
433- Improved inode cache logging. +
434 [small]#_[contributed by Joel Rosdahl]_#
435
436
437=== Documentation improvements
438
439- Removed stray parenthesis. +
440 [small]#_[contributed by Joel Rosdahl]_#
441
442- Improved description of how header files are handled. +
443 [small]#_[contributed by Joel Rosdahl]_#
444
445- Added a hint about using `-fno-pch-timestamp` for precompiled headers with
446 Clang. +
447 [small]#_[contributed by Joel Rosdahl]_#
448
449- Removed obsolete description of compiler type "`pump`". +
450 [small]#_[contributed by Joel Rosdahl]_#
451
452
453
0dca9ddd
JR
454== Ccache 4.7.3
455
456Release date: 2022-11-05
457
458
459=== New features and improvements
460
461- Re-added support for handling a `-Wp,-MD` or `-Wp,-MMD` option with `-o` but
462 without `-MMD`, `-MQ` or `-MT` for GCC and Clang. (This combination of options
463 is used by the Linux kernel build system and became unsupported as a
464 side-effect of a feature added in ccache 4.7.) +
465 [small]#_[contributed by Joel Rosdahl]_#
466
467- Variables that affect Clang version on macOS are now added to the input
468 hash. +
469 [small]#_[contributed by Joel Rosdahl]_#
470
471- Variables that affect the underlying compiler used by ICC (the Intel compiler)
472 are now added to the input hash. +
473 [small]#_[contributed by Joel Rosdahl]_#
474
475
476=== Bug fixes
477
478- Fixed parsing of sloppiness with a trailing delimiter. +
479 [small]#_[contributed by Joel Rosdahl]_#
480
481
482=== Other minor improvements
483
484- Removed a redundant slash in URLs when querying remote HTTP storage. +
485 [small]#_[contributed by Joel Rosdahl]_#
486
487- Improved logging related to the inode cache. +
488 [small]#_[contributed by Joel Rosdahl]_#
489
490
491=== Documentation improvements
492
493- Added documentation of the default value of *keep_comments_cpp*. +
494 [small]#_[contributed by Joel Rosdahl]_#
495
496
497=== Test improvements
498
499- Silenced various benign test warnings. +
500 [small]#_[contributed by Joel Rosdahl]_#
501
502
944f24b8
JR
503== Ccache 4.7.2
504
505Release date: 2022-10-29
506
507
508=== Bug fixes
509
510- Fixed a problem when using 32-bit and 64-bit ccache binaries with the same
511 inode cache file. +
512 [small]#_[contributed by Joel Rosdahl]_#
513
514- Ccache now processes the argument following a `-Xarch` option. +
515 [small]#_[contributed by an anonymous user]_#
516
517- Made sure to use the configured umask for command line operations like
518 `--zero-stats` so that newly created cache directories will have correct
519 permissions. +
520 [small]#_[contributed by Joel Rosdahl]_#
521
522
523=== Build improvements
524
525- Include `limits.h` for `PATH_MAX`. +
526 [small]#_[contributed by Joel Rosdahl]_#
527
528
529=== Test improvements
530
531- Disabled flaky Windows profiling tests. +
532 [small]#_[contributed by Joel Rosdahl]_#
533
534
d392de23
JR
535== Ccache 4.7.1
536
537Release date: 2022-10-22
538
539
540=== Bug fixes
541
542- Fixed a regression in 4.7 related to using the `-MD` or `-MMD` option when
543 compiling an assembler file. +
544 [small]#_[contributed by Joel Rosdahl]_#
545
546
547=== Build improvements
548
549- Added support for compiling ccache with GCC 8. +
550 [small]#_[contributed by Orgad Shaneh]_#
551
552- Removed unneeded C++11 flag in libatomic test. +
60e897bf 553 [small]#_[contributed by Orgad Shaneh]_#
d392de23
JR
554
555
96051ba6
JR
556== Ccache 4.7
557
558Release date: 2022-10-17
559
560
561=== Compatibility notes
562
563- The cache entry format has changed, so ccache 4.7 will not share cache entries
564 with earlier versions. Different ccache versions can however still use the
565 same cache storage without any issues.
566
567- The https://ccache.dev/manual/4.7.html#config_cache_dir[default location of
568 the cache directory] on Windows has been changed from `%APPDATA%\ccache` to
569 `%LOCALAPPDATA%\ccache`. Please remove any existing `%APPDATA%\ccache`
570 directory or move it to `%LOCALAPPDATA%\ccache` to keep it.
571
572
573=== Changed tooling
574
575- A C++17 compiler and CMake 3.15 or newer are now required to
576 build ccache.
577
578
579=== New and improved features
580
581- The https://ccache.dev/manual/4.7.html#config_inode_cache[inode cache] is now
582 enabled by default, but only if the filesystem where ccache's temporary
583 directory is located is known to work with the inode cache. +
584 [small]#_[contributed by Joel Rosdahl]_#
585
586- Improved performance of cache entry reading and writing. +
587 [small]#_[contributed by Joel Rosdahl]_#
588
589- Added a https://ccache.dev/manual/4.7.html#config_remote_only[*remote_only*]
590 configuration option, which tells ccache to disable local storage. This way,
591 ccache can use a shared
592 link:pass:[https://ccache.dev/manual/4.7.html#_remote_storage_backends][network cache]
593 without writing cache entries locally, which can be useful if the local
594 storage is ephemeral. +
595 [small]#_[contributed by Joel Rosdahl]_#
596
597- Renamed configuration option *secondary_storage* to
598 https://ccache.dev/manual/4.7.html#config_remote_storage[*remote_storage*].
599 The old spelling will still work as a deprecated alias. +
600 [small]#_[contributed by Joel Rosdahl]_#
601
602- Improved handling of manifests when using both local and remote storage.
603+
604On a cache miss, ccache used to update the local manifest file and write it to
605remote storage, thereby overwriting any preexisting manifest entries on remote
606storage. Similarly, the local manifest could be replaced by the remote manifest
607on a remote cache hit, thus discarding local entries. This has now been improved
608so that ccache will merge local and remote manifest entries transparently. +
609[small]#_[contributed by Joel Rosdahl and an anonymous user]_#
610
611- Added support for caching assembler listing files with compiler option
612 `-Wa,-a=file`. This also fixes a bug in ccache 4.6.2+ where usage of
613 `-Wa,-march=...` makes ccache fall back to running the compiler. +
614 [small]#_[contributed by Joel Rosdahl]_#
615
616- Improved statistics shown by `ccache --show-stats`. Most values are now shown
617 in relation to a total count, and some less useful statistics counters have
618 been changed to be displayed only with `--verbose`. +
619 [small]#_[contributed by Joel Rosdahl]_#
620
621- Improved statistics for remote hits and misses. +
622 [small]#_[contributed by Joel Rosdahl]_#
623
624- Renamed "`Primary config`" to "`Config file`" and "`Secondary config`" to
625 "`System config file`" in the output of `ccache --show-stats --verbose`. +
626 [small]#_[contributed by Joel Rosdahl]_#
627
628- Added support for
629 link:pass:[https://ccache.dev/manual/4.7.html#_run_modes][masquerading as a
630 compiler] via a copy or hard link of the ccache executable. Previously, ccache
631 only supported masquerading as a compiler by using a symbolic link. +
632 [small]#_[contributed by Joel Rosdahl]_#
633
634- A timestamp is now included in
635 link:pass:[https://ccache.dev/manual/4.7.html#_cache_debugging][per-object
636 debug filenames]. This makes it easier to compare two builds without having to
637 save previous debug files before the second build. It also makes sure debug
638 files won't be overwritten if an object file is compiled several times during
639 one build. +
640 [small]#_[contributed by Joel Rosdahl]_#
641
642- Added support for Clang's `--` option. +
643 [small]#_[contributed by Joel Rosdahl]_#
644
645- Cache entries are now shared for different `-MT`/`-MQ` options. +
646 [small]#_[contributed by Joel Rosdahl]_#
647
648- The https://ccache.dev/manual/4.7.html#config_cache_dir[default location of
649 the cache directory] on Windows has been changed to `%LOCALAPPDATA%\ccache`,
650 both in Windows Bash and Windows native environments such as CMD or
651 Powershell.
652+
653Previous ccache versions defaulted to storing the cache in `%APPDATA%\ccache` on
654Windows in native environment (i.e., when the `%USER%` variable was not set),
655which could result in large network file transfers of the cache in domain
656environments and similar problems. +
657[small]#_[contributed by Rafael Kitover]_#
658
659- Ccache now uses subsecond resolution timestamps when checking for "`too new
660 include files`". In practice, this means that the direct mode will no longer
661 be disabled for newly generated include files. +
662 [small]#_[contributed by Joel Rosdahl]_#
663
664- Started using subsecond resolution timestamps in manifest files. This improves
665 accuracy with *file_stat_matches*
666 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
667 [small]#_[contributed by Joel Rosdahl]_#
668
669- Added support for subsecond timestamps on macOS. +
670 [small]#_[contributed by Joel Rosdahl]_#
671
672- Added link:pass:[https://ccache.dev/manual/4.7.html#_the_depend_mode][depend
673 mode] support for MSVC. +
674 [small]#_[contributed by Orgad Shaneh and Luboš Luňák]_#
675
676- Added support for the Intel compiler on Windows. +
677 [small]#_[contributed by Daniel Richtmann]_#
678
679- Ccache now sets `CCACHE_DISABLE` when running the compiler. This avoids
680 running ccache twice (and potentially storing two different results in the
681 cache) if, for instance, the compiler happens to be a wrapper script that in
682 turn runs `ccache $compiler ...`. +
683 [small]#_[contributed by Joel Rosdahl]_#
684
685- Added support for Redis over Unix sockets. +
686 [small]#_[contributed by Anders F Björklund]_#
687
688- Added support for GCC's `-fprofile-abs-path` option by including the current
689 working directory in the input hash. To opt out of this, set *gcno_cwd*
690 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
691 [small]#_[contributed by Joel Rosdahl]_#
692
693- Made it possible to exclude `-frandom-seed=_seed_` options from the input hash
694 with a new *random_seed*
695 https://ccache.dev/manual/4.7.html#config_sloppiness[sloppiness]. +
696 [small]#_[contributed by Raihaan Shouhell]_#
697
698- Added support for server name in
699 link:pass:[https://ccache.dev/manual/4.7.html#_file_storage_backend][remote
700 storage file URLs] on Windows. +
701 [small]#_[contributed by Joel Rosdahl]_#
702
703- Configuration file locations are now included in the
704 link:pass:[https://ccache.dev/manual/4.7.html#_cache_debugging][debug log]. +
705 [small]#_[contributed by Joel Rosdahl]_#
706
707- The inode cache file is no longer removed with `ccache --clear`. +
708 [small]#_[contributed by Joel Rosdahl]_#
709
710- Result format version and number of files are now printed when inspecting a
711 result cache entry file. +
712 [small]#_[contributed by Joel Rosdahl]_#
713
714
715=== Removed features
716
717- Removed the *share-hits* attribute for remote storage. It has been superseded
718 by the https://ccache.dev/manual/4.7.html#config_remote_only[*remote_only*]
719 configuration option. +
720 [small]#_[contributed by Joel Rosdahl]_#
721
722- Buggy support for GCC-specific environment variables `DEPENDENCIES_OUTPUT` and
723 `SUNPRO_DEPENDENCIES` has been removed. If any of those variables are set,
724 ccache now just falls back to running the real compiler. +
725 [small]#_[contributed by Joel Rosdahl]_#
726
727
728=== Bug fixes
729
730- The correct dependency target will now be produced even when a
731 https://ccache.dev/manual/4.7.html#config_base_dir[base directory] is used --
732 the dependency target will still be an absolute path. +
733 [small]#_[contributed by Joel Rosdahl]_#
734
735- Fixed a bug that could lead to bad modification timestamp (mtime) for object
736 files on systems that lack `utimensat` and `utimes` system calls (such as
737 Windows). +
738 [small]#_[contributed by Joel Rosdahl]_#
739
740- Fixed ordering of MSVC include directory options when using
741 `/external:I<directory>`. +
742 [small]#_[contributed by Raihaan Shouhell]_#
743
744- Fixed capturing of MSVC stdout/stderr when running from Visual Studio. +
745 [small]#_[contributed by Orgad Shaneh]_#
746
747- Carriage return characters are now retained in the compiler output on
748 Windows. +
749 [small]#_[contributed by Orgad Shaneh]_#
750
751- Made sure not to increment the "`preprocessed_cache_miss`" counter in recache
752 mode. +
753 [small]#_[contributed by Joel Rosdahl]_#
754
755- Fixed an issue with the inode cache in combination with
756 `+__DATE__+`/`+__TIME__+`/`+__TIMESTAMP__+` macros in the source code. +
757 [small]#_[contributed by Joel Rosdahl]_#
758
759- Made sure to enable the inode cache only if subsecond timestamps are
760 available. +
761 [small]#_[contributed by Joel Rosdahl]_#
762
763- Cache entries created with enabled hard linking or file cloning are no longer
764 written to remote storage since they won't be possible to retrieve correctly
765 anyway. +
766 [small]#_[contributed by Joel Rosdahl]_#
767
768- Ccache now accepts spaces between target and colon when parsing dependency
769 files in the depend mode. +
770 [small]#_[contributed by Louis Caron]_#
771
772- Fixed a crash when failing to write an error message to stderr after failing
773 to write to the log file. +
774 [small]#_[contributed by Joel Rosdahl]_#
775
776- Made ccache able to retrieve an object file from the cache even if the
777 destination object file exists and is read-only. +
778 [small]#_[contributed by Joel Rosdahl]_#
779
780- The `.exe` extension is now stripped from the ccache executable name in
781 `ccache --version` on Windows. +
782 [small]#_[contributed by Orgad Shaneh]_#
783
784- Fixed naming of temporary files written to the cache directory. +
785 [small]#_[contributed by Joel Rosdahl]_#
786
787
788=== Build improvements
789
790- Enabled static runtime linking for MSVC. +
791 [small]#_[contributed by Cristian Adam and Rafael Kitover]_#
792
793- The Zstandard and Hiredis dependencies are now by default downloaded from the
794 Internet when unavailable. +
795 [small]#_[contributed by Rafael Kitover]_#
796
797- Added support for pkgconfig to find a Zstandard installation. +
798 [small]#_[contributed by Rosen Penev]_#
799
800- Removed usage of the deprecated `codecvt` header. +
801 [small]#_[contributed by Orgad Shaneh]_#
802
803- Added headers to CMake project files. +
804 [small]#_[contributed by Orgad Shaneh]_#
805
806
807=== Test improvements
808
809- Made the integration tests work on Windows. +
810 [small]#_[contributed by Orgad Shaneh and R. Voggenauer]_#
811
812- Improved diagnostics from the "`Version output readable`" test. +
813 [small]#_[contributed by Orgad Shaneh]_#
814
815- Made setting the `KEEP_TESTDIR` variable actually work. +
816 [small]#_[contributed by Louis Caron]_#
817
818- Fixed a typo in depend mode tests. +
819 [small]#_[contributed by Louis Caron]_#
820
821- Added more depend mode tests. +
822 [small]#_[contributed by Louis Caron]_#
823
824
825=== Documentation improvements
826
827- Improved the
828 https://github.com/ccache/ccache/blob/v4.7/doc/INSTALL.md[installation
829 guide]. +
830 [small]#_[contributed by Rafael Kitover]_#
831
832- Fixed a typo in the help text. +
833 [small]#_[contributed by Joel Rosdahl]_#
834
835
da10b8f2
JR
836== Ccache 4.6.3
837
838Release date: 2022-08-27
839
840
841=== Bug fixes
842
843- Fixed MSVC support (regression in ccache 4.6.2). +
844 [small]#_[contributed by Joel Rosdahl]_#
845
846- Fixed detection of PCH header for concatenated `-include` option (e.g.,
847 `-includepch.h` instead of `-include pch.h`). +
848 [small]#_[contributed by Joel Rosdahl]_#
849
850
851=== Build improvements
852
853- Fixed build with musl when using GCC 12. +
854 [small]#_[contributed by Khem Raj]_#
855
856
857=== Test improvements
858
00f5f5f8
JR
859- Disabled the "`Failure to write output file`" test when running on a
860 filesystem that doesn't support read-only directories. +
da10b8f2
JR
861 [small]#_[contributed by Joel Rosdahl]_#
862
863
6727cbee
JR
864== Ccache 4.6.2
865
866Release date: 2022-08-22
867
868
869=== Bug fixes
870
871- Fixed a race condition that could lead to a crash if a file in the cache is
872 removed with unlucky timing, e.g. by another ccache process doing cache
873 cleanup. +
874 [small]#_[contributed by Joel Rosdahl]_#
875
876- Dependency file rewriting will now always be performed if
877 `base_dir`/`CCACHE_BASEDIR` is active. This fixes a problem with the
878 dependency file content when Clang is used with `-fsanitize=address`. +
879 [small]#_[contributed by Joel Rosdahl]_#
880
881- Fixed handling of error condition for `--hash-file`/`--checksum-file`. +
882 [small]#_[contributed by Joel Rosdahl]_#
883
884- Made sure to enable the inode cache only if subsecond `stat` timestamps are
885 available. +
886 [small]#_[contributed by Joel Rosdahl]_#
887
888- Added a work-around for a Clang bug when writing to a full NFS file system. +
889 [small]#_[contributed by Joel Rosdahl]_#
890
891- Made failure writing to the output file increment the "`bad output file`"
892 counter instead of "`cache miss`". +
893 [small]#_[contributed by Joel Rosdahl]_#
894
895- Fixed false positive cache hits for code constructions similar to
896 `__asm__(".incbin" " \"file\"")`. +
897 [small]#_[contributed by Joel Rosdahl]_#
898
899- Fixed false success for `-fcolor-diagnostics` probe with GCC. A side effect of
900 this is that a compiler type that ccache can't identify from the compiler name
901 (such as `/usr/bin/cc` where `cc` is not a symlink) from now on won't produce
902 color diagnostics when used via ccache even if the compiler actually is GCC or
903 Clang. +
904 [small]#_[contributed by Joel Rosdahl]_#
905
906- More cases of invalid secondary storage URLs are now handled gracefully. +
907 [small]#_[contributed by Joel Rosdahl]_#
908
909- Fixed the display of maximum cache size in `ccache -s` if it's 0 (=
910 unlimited). +
911 [small]#_[contributed by Joel Rosdahl]_#
912
913- Removed AsciiDoc markup from help text of `--trim-dir`. +
914 [small]#_[contributed by Joel Rosdahl]_#
915
916- The temporary directory is now cleaned up properly even if it's left
917 unconfigured. +
918 [small]#_[contributed by Joel Rosdahl]_#
919
920- Made cleanup of the temporary directory not rely a directory timestamp. +
921 [small]#_[contributed by Joel Rosdahl]_#
922
923- Made sure to retain mtime/atime when recompressing cache files with
924 `-X`/`--recompress`. +
925 [small]#_[contributed by Joel Rosdahl]_#
926
927- The correct umask is now used when populating the primary cache from a
928 secondary cache. +
929 [small]#_[contributed by Joel Rosdahl]_#
930
931- Fixed creation of temporary files on file systems that don't support hard
932 links (such as FAT32). +
933 [small]#_[contributed by Joel Rosdahl]_#
934
935- Added knowledge about `-Wa,...=file` so that ccache then falls back to running
936 the real compiler. +
937 [small]#_[contributed by Joel Rosdahl]_#
938
939- Corrected handling of space in paths when using response file on Windows. +
940 [small]#_[contributed by Sergey Semushin]_#
941
942- Fixed crash due to empty include filename in preprocessor output generated by
943 `f2c`. +
944 [small]#_[contributed by Oleg Sidorkin]_#
945
946
947=== Build improvements
948
949- Fixed build problems with a development version of GCC 13. +
950 [small]#_[contributed by Joel Rosdahl]_#
951
952- Fixed build problems with MSVC. +
953 [small]#_[contributed by Florin Trofin]_#
954
955
956=== Test improvements
957
958- Clang warnings from the "`-fdebug-prefix-map`" test are now suppressed. +
959 [small]#_[contributed by Joel Rosdahl]_#
960
961- Made sure to only run the "`-ftest-coverage + -fprofile-dir`" test with GCC. +
962 [small]#_[contributed by Joel Rosdahl]_#
963
964- Fixed printing of error messages with embedded newlines. +
965 [small]#_[contributed by Joel Rosdahl]_#
966
967- Fixed warning when running the "`inode_cache`" test in isolation. +
968 [small]#_[contributed by Joel Rosdahl]_#
969
970- Fixed test failure when the compiler used for testing is an old ccache version
971 masquerading as the compiler. +
972 [small]#_[contributed by Joel Rosdahl]_#
973
974
975=== Documentation improvements
976
977- Mentioned that mtime is used for LRU cleanup. +
978 [small]#_[contributed by Joel Rosdahl]_#
979
980
42b13761
JR
981== Ccache 4.6.1
982
983Release date: 2022-05-15
984
985
986=== New features
987
988- Added support for passing a directory to the MSVC `/Fo` option. +
989 [small]#_[contributed by Orgad Shaneh]_#
990
991- Added knowledge about the `-imsvc` compiler option. +
992 [small]#_[contributed by Jacob Young]_#
993
994- Added knowledge about the `-z` linker option. +
995 [small]#_[contributed by Joel Rosdahl]_#
996
997
998=== Bug fixes
999
1000- Improved handling of `.gcno` files in combination with absolute input file
1001 paths. +
1002 [small]#_[contributed by Joel Rosdahl]_#
1003
1004- Adapted to changes in GCC 9+ `.gcno` files, which contain the current working
1005 directory, by including said directory in the hash. You can opt out of this by
1006 enabling "`gcno_cwd sloppiness`". +
1007 [small]#_[contributed by Joel Rosdahl]_#
1008
1009- A preexisting object file is no longer considered when using
1010 `-fsyntax-only`. +
1011 [small]#_[contributed by Joel Rosdahl]_#
1012
1013- Authenticate with Redis before database selection. +
1014 [small]#_[contributed by an anonymous user]_#
1015
1016- Don't exit with an error on failure reading a cached file. +
1017 [small]#_[contributed by an anonymous user]_#
1018
1019- Bail out on too hard MSVC environment variables `CL` and `+_CL_+`. +
1020 [small]#_[contributed by Joel Rosdahl]_#
1021
1022- Only use `/run/user/<UID>/ccache-tmp` as the temporary directory if it's
1023 writable. +
1024 [small]#_[contributed by Joel Rosdahl]_#
1025
1026- Fixed handling of the final newline in cached standard output from the
1027 compiler. +
1028 [small]#_[contributed by Orgad Shaneh]_#
1029
1030- Fixed a bug related to distcc markers in standard error output. +
1031 [small]#_[contributed by Joel Rosdahl]_#
1032
1033- Paths to `base_dir` are now properly normalized on Windows. +
1034 [small]#_[contributed by Vili Väinölä and Joel Rosdahl]_#
1035
1036- Fixed handling of MSVC `/Fp` and `/Yu` options with concatenated path. +
1037 [small]#_[contributed by Joel Rosdahl]_#
1038
1039- Fixed "`Multiple precompiled headers used`" error if MSVC `/Yu` option is used
1040 after `/Fp`. +
1041 [small]#_[contributed by Alexey Telishev]_#
1042
1043- Check for short reads when reading strings in result/manifest files. +
96051ba6 1044 [small]#_[contributed by Gregor Jasny]_#
42b13761
JR
1045
1046- Log expanded secondary storage URL in put/remove. +
1047 [small]#_[contributed by Joel Rosdahl]_#
1048
1049- Fixed logging of statistics counters with value higher than one in debug log
1050 and stats log. +
1051 [small]#_[contributed by Joel Rosdahl]_#
1052
1053- Avoid incorrect error log message for Redis write operations in `reshare`
1054 mode. +
1055 [small]#_[contributed by Joel Rosdahl]_#
1056
1057- Support Redis URL without host (meaning localhost). +
1058 [small]#_[contributed by Joel Rosdahl]_#
1059
1060
1061=== Build improvements
1062
1063- Prefer CMake find module for hiredis and zstd packages. +
1064 [small]#_[contributed by Cristian Adam and Joel Rosdahl]_#
1065
1066- Fixed building and linking BLAKE3 with MSVC. +
1067 [small]#_[contributed by Rafael Kitover]_#
1068
1069- Fixed static linkage with hiredis on Windows. +
1070 [small]#_[contributed by Orgad Shaneh]_#
1071
1072- Fixed miscompile of nonstd::expected on MSVC v19.22. +
1073 [small]#_[contributed by Jacob Young]_#
1074
1075- Fixed build arguments to clang-cl. +
1076 [small]#_[contributed by Jacob Young]_#
1077
1078- Fixed parsing of MSVC response files. +
1079 [small]#_[contributed by Jacob Young]_#
1080
1081- Support Git 1.x when determining ccache version. +
1082 [small]#_[contributed by Joel Rosdahl]_#
1083
1084
1085=== Test improvements
1086
1087- Worked around an endianness problem which affected builds and tests on
1088 big-endian systems. +
1089 [small]#_[contributed by Joel Rosdahl]_#
1090
1091- A C++-capable compiler is no longer required for the test suite. +
1092 [small]#_[contributed by Joel Rosdahl]_#
1093
1094- Fixed an issue with inode cache tests, leading to sporadic failures in the
1095 inode test suite when running many parallel tests. +
1096 [small]#_[contributed by Joel Rosdahl]_#
1097
1098- Fixed sporadic failures in the profiling test suite. +
1099 [small]#_[contributed by Jacob Young]_#
1100
1101
1102=== Documentation improvements
1103
1104- Added reference to example build configs in installation instructions. +
1105 [small]#_[contributed by an anonymous user]_#
1106
1107- Default cache locations are now mentioned for Windows and macOS as well. +
1108 [small]#_[contributed by Joel Rosdahl]_#
1109
1110- Added a warning about usage of `base_dir`. +
1111 [small]#_[contributed by Joel Rosdahl]_#
1112
1113
9656bc59
JR
1114== Ccache 4.6
1115
1116Release date: 2022-02-27
1117
1118
1119=== New features
1120
c1e2d79c
JR
1121- Added support for caching calls to Microsoft Visual C++ (MSVC) and clang-cl
1122 (MSVC compatibility for Clang). +
9656bc59
JR
1123 [small]#_[contributed by Cristian Adam, Luboš Luňák, Orgad Shaneh and Joel
1124 Rosdahl]_#
1125
1126- Added an option to use a bearer token with the HTTP backend. This makes it
1127 possible to use e.g. Google Cloud Storage as a secondary storage backend. +
b2c65a22 1128 [small]#_[contributed by an anonymous user]_#
9656bc59
JR
1129
1130- Added support for caching standard output from the compiler. +
1131 [small]#_[contributed by Luboš Luňák and Joel Rosdahl]_#
1132
1133- Added a new `--inspect` option for debugging cache entries, replacing the
1134 previous `--dump-manifest` and `--dump-result` options. +
1135 [small]#_[contributed by Joel Rosdahl]_#
1136
1137- Enabled HTTP keep-alive by default. +
1138 [small]#_[contributed by Joel Rosdahl]_#
1139
1140
1141=== Bug fixes
1142
1143- Fixed copying of binary files on Windows. +
1144 [small]#_[contributed by R. Voggenauer]_#
1145
1146- Improved detection of the `.incbin` assembler directive to reduce false
1147 positives. +
1148 [small]#_[contributed by Alexey Sheplyakov]_#
1149
1150- Ccache now verifies that `/run/user/<UID>/ccache-tmp` is writable before using
1151 it for temporary files. +
1152 [small]#_[contributed by Joel Rosdahl]_#
1153
1154- Fixed statistics output for secondary storage. +
1155 [small]#_[contributed by Orgad Shaneh]_#
1156
1157- Fixed a problem when copying a cache entry from secondary storage into an
1158 empty primary storage. +
1159 [small]#_[contributed by Joel Rosdahl]_#
1160
1161- Visual Studio .rsp files with UTF-16LE encoding are now handled correctly. +
1162 [small]#_[contributed by Vili Väinölä]_#
1163
1164- Made conversion to relative paths more reliable on Windows. +
1165 [small]#_[contributed by Marius Zwicker]_#
1166
1167- The process umask is now respected when making hard linked files read only. +
1168 [small]#_[contributed by Joel Rosdahl]_#
1169
1170- A forced recache is no longer considered a "`direct cache miss`". +
1171 [small]#_[contributed by Joel Rosdahl]_#
1172
1173
1174=== Documentation improvements
1175
1176- Corrected reference to the `debug_dir` option. +
1177 [small]#_[contributed by Joel Rosdahl]_#
1178
1179- Improved documentation of `--config-path`. +
1180 [small]#_[contributed by Joel Rosdahl]_#
1181
1182- Added documentation that compiler plugins are hashed too. +
1183 [small]#_[contributed by Philipp Gortan]_#
1184
1185
1186=== Test improvements
1187
1188- The "`trim_dir`" test suite is now only run when cleanup tests are enabled. +
1189 [small]#_[contributed by Joel Rosdahl]_#
1190
1191
7a58b80c
JR
1192== Ccache 4.5.1
1193
1194Release date: 2021-11-17
1195
1196
1197=== Bug fixes
1198
1199- Fixed entry_size field for result entries. This bug affected the recompression
1200 feature (`-X`/`--recompress`) in ccache 4.5. +
1201 [small]#_[contributed by Joel Rosdahl]_#
1202
1203- The actual compression level is now once again stored in the cache entry
1204 header. +
1205 [small]#_[contributed by Joel Rosdahl]_#
1206
3794279b 1207- Corrected error handling for non-constructible secondary storage backends. For
7a58b80c
JR
1208 instance, this avoids a crash when a Redis server can't be reached. +
1209 [small]#_[contributed by Joel Rosdahl]_#
1210
1211
6eedb905
JR
1212== Ccache 4.5
1213
1214Release date: 2021-11-13
1215
1216
1217=== New features
1218
1219- Made various improvements to the cache entry format. Among other things, the
1220 header now contains a creation timestamp and a note of the ccache version used
1221 to create the entry. The cache entry checksum has also been upgraded to use
1222 128-bit XXH3 instead 64-bit XXH3. +
1223 [small]#_[contributed by Joel Rosdahl]_#
1224
1225- Added support for cache namespaces. If a namespace configured, e.g. using
1226 `CCACHE_NAMESPACE=some_string`, the namespace string will be added to the
1227 hashed data for each compilation. This will make the associated cache entries
1228 logically separate from cache entries in other namespaces, but they will still
1229 share the same storage space. Cache entries can also be selectively removed
1230 from the primary cache with the new command line option `--evict-namespace`,
1231 potentially in combination with `--evict-older-than`. +
1232 [small]#_[contributed by Joel Rosdahl]_#
1233
1234- Made HTTP keep-alive configurable, defaulting to off for now. +
1235 [small]#_[contributed by Gregor Jasny]_#
1236
1237- Added support for rewriting absolute path to Clang option `--gcc-toolchain`. +
1238 [small]#_[contributed by Joel Rosdahl]_#
1239
1240
1241=== Compatibility notes
1242
1243- A consequence of the changed cache entry format is that ccache 4.5 will not
1244 share cache entries with earlier versions. Different ccache versions can
1245 however still use the same cache storage without any issues.
1246
1247
1248=== Bug fixes
1249
1250- Fixed a problem with special characters in the user info part of URLs for HTTP
1251 storage. +
1252 [small]#_[contributed by Russell McClellan]_#
1253
1254- Fixed win32 log messages about file locks. +
1255 [small]#_[contributed by Luboš Luňák]_#
1256
1257- Fixed debug directory handling on Windows. +
1258 [small]#_[contributed by Luboš Luňák]_#
1259
1260- The hard link and file clone features are now disabled when secondary storage
1261 is used since they only work for the local primary cache. +
1262 [small]#_[contributed by Joel Rosdahl]_#
1263
1264
af4c6e57
JR
1265== Ccache 4.4.2
1266
1267Release date: 2021-09-28
1268
1269
1270=== Bug fixes
1271
1272- Fixed a bug introduced in 4.4 where ccache could produce false direct cache
1273 hits in some situations if it decides to disable the direct mode temporarily
1274 (e.g. due to "`too new header`" file). +
1275 [small]#_[contributed by Joel Rosdahl]_#
1276
1277
1278=== Test improvements
1279
1280- Use shell builtin pwd command for basedir test. +
1281 [small]#_[contributed by Kira Bruneau]_#
1282
1283- Cope with CC being a wrapper script that uses ccache. +
1284 [small]#_[contributed by Joel Rosdahl]_#
1285
1286
8ba96ed8
JR
1287== Ccache 4.4.1
1288
1289Release date: 2021-09-11
1290
1291
1292=== New features
1293
1294- The secondary storage statistics section of `-s/--show-stats` is now shown
1295 only if it's non-empty or with two verbose options. +
1296 [small]#_[contributed by Joel Rosdahl]_#
1297
1298- Added display of statistics counters for misses. Previously they were only
1299 implicit in the "`hits + misses`" sums. +
1300 [small]#_[contributed by Joel Rosdahl]_#
1301
1302
1303=== Bug fixes
1304
1305- Fixed spurious crashes when using the HTTP or Redis backend and the remote
1306 connection hung up. +
1307 [small]#_[contributed by Joel Rosdahl]_#
1308
1309- Made sure to always store configuration origin value. +
1310 [small]#_[contributed by Gregor Jasny]_#
1311
1312
1313=== Build improvements
1314
1315- The matching version of lld is now used for Clang. +
1316 [small]#_[contributed by Gregor Jasny]_#
1317
1318- The standard linker is now used if IPO (LTO) is enabled. +
1319 [small]#_[contributed by Gregor Jasny]_#
1320
1321- Disabled IPO (LTO) for MinGW toolchains since they seem to be generally
1322 broken. +
1323 [small]#_[contributed by Gregor Jasny]_#
1324
1325- Fixed build errors with Clang on Windows. +
1326 [small]#_[contributed by Orgad Shaneh]_#
1327
1328
1329=== Test improvements
1330
1331- Fixed .incbin test with newer binutil versions. +
1332 [small]#_[contributed by Joel Rosdahl]_#
1333
1334- Fixed basedir test suite failure when using a symlinked CWD. +
1335 [small]#_[contributed by Joel Rosdahl]_#
1336
1337- Improved output of differing text files on failure. +
1338 [small]#_[contributed by Joel Rosdahl]_#
1339
1340
4a91de14
JR
1341== Ccache 4.4
1342
6ac58b50 1343Release date: 2021-08-19
4a91de14
JR
1344
1345
1346=== New features
1347
1348- Made it possible to share a cache over network or on a local filesystem. The
1349 configuration option `secondary_storage`/`CCACHE_SECONDARY_STORAGE` specifies
1350 one or several storage backends to query after the primary local cache
1351 storage. It is also possible to configure sharding (partitioning) of the cache
1352 to spread it over a server cluster using
1353 https://en.wikipedia.org/wiki/Rendezvous_hashing[Rendezvous hashing]. See the
1354 _https://ccache.dev/manual/4.4.html#_secondary_storage_backends[Secondary
1355 storage backends]_ chapter in the manual for details. +
5776a622 1356 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1357
1358- Added an HTTP backend for secondary storage on any HTTP server that supports
1359 GET/PUT/DELETE methods. See https://ccache.dev/howto/http-storage.html[How to
1360 set up HTTP storage] for hints on how to set up an HTTP server for use with
1361 ccache. +
5776a622 1362 [small]#_[contributed by Gregor Jasny]_#
4a91de14
JR
1363
1364- Added a Redis backend for secondary storage on any server that supports the
1365 Redis protocol. See https://ccache.dev/howto/redis-storage.html[How to set up
1366 Redis storage] for hints on how to set up a Redis server for use with
1367 ccache. +
5776a622 1368 [small]#_[contributed by Anders F Björklund]_#
4a91de14
JR
1369
1370- Added a filesystem backend for secondary storage. It can for instance be used
1371 for a shared cache over networked filesystems such as NFS, or for mounting a
1372 secondary read-only cache layer into a build container. +
5776a622 1373 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1374
1375- Added `--trim-dir`, `--trim-max-size` and `--trim-method` options that can be
1376 used to trim a secondary storage directory to a certain size, e.g. via
1377 cron. +
5776a622 1378 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1379
1380- Added a configuration option `reshare`/`CCACHE_RESHARE` which makes ccache
1381 send results to secondary storage even for primary storage cache hits. +
5776a622 1382 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1383
1384- Added new statistics counters for direct/preprocessed cache misses, primary
1385 storage hits/misses, secondary storage hits/misses/errors/timeouts and forced
1386 recaches. +
5776a622 1387 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1388
1389- Improved statistics summary. The `-s`/`--show-stats` option now prints a more
1390 condensed overview where the counters representing "`uncacheable calls`" are
1391 summed as uncacheable and errors counters. The summary shows hit rate for
1392 direct/preprocessed hits/misses, as well as primary/secondary storage
1393 hits/misses. More details are shown with `-v`/`--verbose`. Note: Scripts
1394 should use `--print-stats` (available since ccache 3.7) instead of trying to
1395 parse the output of `--show-stats`. +
5776a622 1396 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1397
1398- Added a "`stats log`" feature (configuration option
1399 `stats_log`/`CCACHE_STATSLOG`), which tells ccache to store statistics in a
1400 separate log file specified by the user. It can for instance be used to
1401 collect statistics for a single build without interference from other
1402 concurrent builds. Statistics from the log file can then be viewed with
1403 `ccache --show-log-stats`. +
5776a622 1404 [small]#_[contributed by Anders F Björklund]_#
4a91de14
JR
1405
1406- Added support for clang's `--config` option. +
5776a622 1407 [small]#_[contributed by Tom Stellard]_#
4a91de14
JR
1408
1409- Added support for one `-Xarch_*` option that matches a corresponding `-arch`
1410 option. +
5776a622 1411 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1412
1413- Renamed the `--directory` option to `--dir` for consistency with other
1414 options. +
5776a622 1415 [small]#_[contributed by Joel Rosdahl]_#
4a91de14 1416
1f320120
JR
1417- Made the `--config-path` and `--dir` options affect the whole command line so
1418 that they don't have to be put before `-s`/`--show-stats`. +
5776a622 1419 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1420
1421- Made `--dump-manifest` and `--dump-result` accept filename `-` for reading
1422 from standard input. +
5776a622 1423 [small]#_[contributed by Anders F Björklund]_#
4a91de14
JR
1424
1425- Made the output of `--print-stats` sorted. +
5776a622 1426 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1427
1428- Added more internal trace points. +
5776a622 1429 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1430
1431
1432=== Bug fixes
1433
1434- Fixed a crash if using `base_dir` and `$PWD` is set to a relative path. +
5776a622 1435 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1436
1437- Fixed a bug with `-fprofile-generate` where ccache could give false positive
1438 cache hits when compiling with relative paths in another directory. +
5776a622 1439 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1440
1441- Fixed a bug in `debug_dir`/`CCACHE_DEBUGDIR`. The absolute path to the object
1442 file was not created correctly if the object file didn't already exist. +
5776a622 1443 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1444
1445- Disabled preprocessor hits for pre-compiled headers with Clang again. +
5776a622 1446 [small]#_[contributed by Arne Hasselbring]_#
4a91de14
JR
1447
1448- Fixed a problem when using the Gold linker on MIPS by only probing for a
1449 faster linker in dev build mode and on x86_64. +
5776a622 1450 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1451
1452- Made the `-DENABLE_TRACING=1` mode work again. +
5776a622 1453 [small]#_[contributed by Anders F Björklund]_#
4a91de14
JR
1454
1455
1456=== Changed tooling
1457
1458- A C++14 compiler or newer is now required to build ccache. For GCC, this means
1459 version 6 or newer in practice.
1460
1461- CMake 3.10 or newer is now required to build ccache.
1462
1463- https://asciidoctor.org[Asciidoctor] is now required to build ccache
1464 documentation.
1465
1466
1467=== Build/test/documentation improvements
1468
1469- Fixed an issue in the modules test suite that showed up when running the
1470 ccache test suite with the clang wrapper provided by Nixpkgs. +
5776a622 1471 [small]#_[contributed by Ryan Burns]_#
4a91de14
JR
1472
1473- Made the nvcc_ldir test suite require a working NVCC. +
5776a622 1474 [small]#_[contributed by Michael Kruse]_#
4a91de14
JR
1475
1476- Made the ivfsoverlay test suite more robust. +
5776a622 1477 [small]#_[contributed by Michael Kruse]_#
4a91de14
JR
1478
1479- Fixed issue with usage of `/FI` when building ccache with MSVC. +
5776a622 1480 [small]#_[contributed by Michael Kruse]_#
4a91de14
JR
1481
1482- Fixed Apple Clang detection in the integration test suite. +
5776a622 1483 [small]#_[contributed by Gregor Jasny]_#
4a91de14
JR
1484
1485- Made clang the default compiler when running the test suite on macOS. +
5776a622 1486 [small]#_[contributed by Gregor Jasny]_#
4a91de14
JR
1487
1488- Silenced stray printout from "-P -c" test case. +
5776a622 1489 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1490
1491- Fixed selection of the ccache binary to use when running the test suite with
1492 multi-config generators like Xcode. +
5776a622 1493 [small]#_[contributed by Gregor Jasny]_#
4a91de14
JR
1494
1495- Fixed CMake feature detection for `ctim`/`mtim` fields in `struct stat`. +
5776a622 1496 [small]#_[contributed by Gregor Jasny]_#
4a91de14
JR
1497
1498- Fixed issue with not linking to .lib correctly on Windows. +
5776a622 1499 [small]#_[contributed by R. Voggenauer]_#
4a91de14
JR
1500
1501- Made it possible to override `CCACHE_DEV_MODE` on the command line. +
5776a622 1502 [small]#_[contributed by Joel Rosdahl]_#
4a91de14
JR
1503
1504- Improved HTML documentation style. +
5776a622 1505 [small]#_[contributed by Joel Rosdahl with minor fixes by Orgad Shaneh]_#
4a91de14
JR
1506
1507
63239e95 1508== Ccache 4.3
d3040209 1509
2c13bce2
JR
1510Release date: 2021-05-09
1511
63239e95
JR
1512
1513=== New features
2c13bce2
JR
1514
1515- Ccache now ignores the Clang compiler option `-ivfsoverlay` and its argument
63239e95 1516 if you opt in to "`ivfsoverlay sloppiness`". This is useful if you use Xcode,
2c13bce2
JR
1517 which uses a virtual file system (VFS) for things like combining Objective-C
1518 and Swift code.
1519
63239e95
JR
1520- When using `-P` in combination with `-E`, ccache now reports this as "`called
1521 for preprocessing`" instead of "`unsupported compiler option`".
2c13bce2
JR
1522
1523- Added support for `-specs file.specs` and `--specs file.specs` without an
1524 equal sign between the arguments.
1525
1526
63239e95 1527=== Bug fixes
2c13bce2 1528
63239e95 1529- "`Split dwarf`" code paths are now disabled when outputting to `/dev/null`. This
2c13bce2
JR
1530 avoids an attempt to delete `/dev/null.dwo`.
1531
1532- Made the `stat`/`lstat` wrapper function for Windows treat pending deletes as
1533 missing files.
1534
1535- Fixed a bug that made ccache process header files redundantly for some
1536 relative headers when using Clang.
1537
402e28b6 1538- The object path is now included in the input hash when using `-fprofile-arcs`
2c13bce2
JR
1539 (or `--coverage`) since the object file embeds a `.gcda` path based on the
1540 object file path.
1541
1542
63239e95 1543=== Build improvements
2c13bce2
JR
1544
1545- Added an `ENABLE_DOCUMENTATION` build option (default: true) that can be used
1546 to disable the build of documentation.
1547
1548- Fixed detection of pthread features.
1549
1550- Quote CMake variables expansions to avoid errors when
1551 `${CMAKE_C_FLAGS_RELWITHDEBINFO}` or `${CMAKE_CXX_FLAGS_RELWITHDEBINFO}`
1552 expands to the empty string.
1553
1554
63239e95
JR
1555== Ccache 4.2.1
1556
1a07c09d 1557Release date: 2021-03-27
010d0667 1558
63239e95
JR
1559
1560=== Bug fixes
010d0667 1561
39baaa63
JR
1562- Ccache now only duplicates the stderr file descriptor into `$UNCACHED_ERR_FD`
1563 for calls to the preprocessor/compiler. This works around a complex bug in
1564 interaction with GNU Make, LTO linking and the Linux PTY driver.
010d0667
JR
1565
1566- Fixed detection of color diagnostics usage when using `-Xclang
1a07c09d 1567 -fcolor-diagnostics` options.
010d0667
JR
1568
1569- The `-frecord-gcc-switches` compiler option is now handled correctly to avoid
1570 false positive cache hits.
1571
1572- Made it possible for per-compilation debug log files to be written in most
1573 argument processing error scenarios. Previously, ccache would only write debug
1574 log files if the argument processing phase was successful.
1575
1576- Made ccache bail out on too hard Clang option `-gen-cdb-fragment-path`.
1577
1578- The `run_second_cpp` made is now enforced on macOS if `-g` is used since newer
1579 Clang versions on macOS produce different debug information when compiling
1580 preprocessed code.
1581
1582- Made ccache only reject `-f(no-)color-diagnostics` for a known GCC compiler.
1a07c09d 1583 This fixes a problem when using said option with Clang on macOS.
010d0667
JR
1584
1585- Implemented a better `stat`/`lstat` wrapper function for Windows.
1586
1587- Fixed a bug where ccache could return stale cache results on Windows.
1588
1589- Fixed handling of long command lines on Windows.
1590
1591
63239e95 1592=== Portability and build improvements
010d0667
JR
1593
1594- Build configuration scripts now probe for atomic increment as well. This fixes
1595 a linking error on Sparc.
1596
1597- An existing CMake log message level is now used when warning about not finding
1598 asciidoc.
1599
1600- Added support for building ccache with xlclang++ on AIX 7.2.
1601
63239e95 1602- Fixed assertion in the "`Debug option`" test.
010d0667
JR
1603
1604- Made build configuration skip using ccache when building with MSVC.
1605
1606- Upgraded to doctest 2.4.6. This fixes a build error with glibc >= 2.34.
1607
1608
63239e95 1609=== Documentation
010d0667 1610
63239e95 1611- Fixed markup of `compiler_type` value `other`.
010d0667
JR
1612
1613- Fixed markup of `debug_dir` documentation.
1614
1615- Fixed references to the `extra_files_to_hash` configuration option.
1616
1617
63239e95
JR
1618== Ccache 4.2
1619
12ecd73f 1620Release date: 2021-02-02
bc6f070e 1621
63239e95
JR
1622
1623=== New features
bc6f070e
JR
1624
1625- Improved calculation of relative paths when using `base_dir` to also consider
1626 canonical paths (i.e. paths with dereferenced symlinks) as candidates.
1627
1628- Added a `debug_dir` (`CCACHE_DEBUGDIR`) configuration setting for specifying a
1629 directory for files written in debug mode.
1630
1631- Added support for compiler option `-x cuda`, understood by Clang.
1632
bc6f070e
JR
1633- The value of the `SOURCE_DATE_EPOCH` variable is now only hashed if it
1634 potentially affects the output from ccache. This means that ccache now (like
8793d120 1635 before version 4.0) will be able to produce cache hits for source code that
1819896e 1636 doesn't contain `+__DATE__+` or `+__TIME__+` macros regardless of the value of
bc6f070e
JR
1637 `SOURCE_DATE_EPOCH`.
1638
2de21d02 1639
63239e95 1640=== Bug fixes
2de21d02 1641
bc6f070e
JR
1642- Fixed a bug where a non-Clang compiler would silently accept the
1643 Clang-specific `-f(no-)color-diagnostics` option when run via ccache. This
1644 confused feature detection made by e.g. CMake.
1645
1646- Improved creation of temporary files on Windows. Previously, ccache would in
1647 practice reuse temporary filenames on said platform resulting in various
1648 problems with parallel builds.
1649
1650- Fixed creation of parent directories when creating a lock file on Windows.
1651
1652- Fixed a race condition related to removal of temporary files.
1653
1654- Improved calculation of directory name for a Windows-style path.
1655
1656- A compilation result is now not stored in the cache if an included
1657 preprocessed header file is too new. This fixes a bug where the content of a
1658 newly created preprocessed header file could be missing from the hash,
1659 resulting in a false positive cache hit.
1660
1661- Fixed calculation of the split DWARF filename for an object filename with zero
1662 or multiple dots.
1663
1664- Fixed retrieval of the object file the destination is `/dev/null`.
1665
1666
63239e95 1667=== Portability and build improvements
bc6f070e
JR
1668
1669- Additional compiler flags like `-Wextra -Werror` are now only added when
1670 building ccache in developer mode.
1671
1672- The developer build mode no longer enables `-Weverything` for Clang.
1673
1674- `_XOPEN_SOURCE` is now defined appropriately on FreeBSD to fix missing
1675 declaration of `isascii`.
1676
1677- Improved detection of buildability of BLAKE3 assembler files.
1678
1679- Disabled build of inode cache code on OSes without
1680 `pthread_mutexattr_setpshared`, such as OpenBSD.
1681
1682- Made static linking the default for a Windows MinGW build.
1683
1684- Removed legacy fallback replacements of `mkstemp` and `realpath`.
1685
1686- Improved detection of SSE/AVX support.
1687
1688- Improved detection of support for the AVX2 target attribute.
1689
1690- Configuration scripts now try to detect and enable BLAKE3's Neon support.
1691
1692- Made it possible to run the integration test suite on macOS.
1693
1694- Fixed building of 32-bit unit tests on macOS.
1695
1696- Made it possible to compile ccache for C++17.
1697
1698- Fixed printing of 64-bit `time_t` on 32-bit architectures like RISCV32.
1699
1700- Made sure to only use ASCII characters in the manual's AsciiDoc source code to
1701 make it possible to generate documentation in non-UTF8 locales.
1702
1703- Upgraded to optional-lite 3.4.0, fmt 7.1.3, doctest 2.4.4 and zstd 1.4.8.
1704
1705- Took steps towards being able to run the test suite on Windows.
1706
1707
63239e95 1708=== Documentation
bc6f070e
JR
1709
1710- Improved wording of `compiler_check` string values.
1711
1712- Improved documentation of compression levels and the `-X/--recompress` option.
1713
1714- Improved consistency of terms in the manual.
1715
1716- HTML documentation is now built and installed by default if possible.
1717
1718- Fixed incorrect documentation of configuration option `cache_dir`.
1719
1720- Added hint on how to link statically with libzstd.
1721
1722- Mention that ccache requires the `-c` compiler option.
1723
1724
63239e95
JR
1725== Ccache 4.1
1726
897b6065
JR
1727Release date: 2020-11-22
1728
63239e95
JR
1729
1730=== New features
897b6065
JR
1731
1732- Symlinks are now followed when guessing the compiler. This makes ccache able
63239e95
JR
1733 to guess compiler type "`GCC`" for a common symlink chain like this:
1734 `/usr/bin/cc` -> `/etc/alternatives/cc` -> `/usr/bin/gcc` -> `gcc-9` ->
897b6065
JR
1735 `x86_64-linux-gnu-gcc-9`.
1736
1737- Added a new `compiler_type` (`CCACHE_COMPILERTYPE`) configuration option that
1738 allows for overriding the guessed compiler type.
1739
1740- Added support for caching compilations with `-fsyntax-only`.
1741
1742- Added a command line option `--config-path`, which specifies the
1743 configuration file to operate on. It can be used instead of setting
1744 `CCACHE_CONFIGPATH` temporarily.
1745
1746
63239e95 1747=== Bug fixes
897b6065
JR
1748
1749- The original color diagnostics options are now retained when forcing colored
1750 output. This fixes a bug where feature detection of the `-fcolor-diagnostics`
1751 option would succeed when run via ccache even though the actual compiler
63239e95 1752 doesn't support it (e.g. GCC <4.9).
897b6065
JR
1753
1754- Fixed a bug related to umask when using the `umask` (`CCACHE_UMASK`)
1755 configuration option.
1756
1757- Allow `ccache ccache compiler ...` (repeated `ccache`) again.
1758
63239e95 1759- Fixed parsing of dependency file in the "`depend mode`" so that filenames with
897b6065
JR
1760 space or other special characters are handled correctly.
1761
1762- Fixed rewriting of the dependency file content when the object filename
1763 includes space or other special characters.
1764
1765- Fixed runtime detection of AVX2 support, not relying on the sometimes broken
1766 `__builtin_cpu_support` routine.
1767
1768- Added missing parameters to a log call, thus avoiding a crash when it is
1769 found out at runtime that file cloning is unsupported by the OS.
1770
1771
63239e95 1772=== Portability and build fixes
897b6065
JR
1773
1774- The ccache binary is now linked with `libatomic` if needed. This fixes build
1775 problems with GCC on ARM and PowerPC.
1776
1777- Fixed build of BLAKE3 code with Clang 3.4 and 3.5.
1778
63239e95
JR
1779- Fixed "`use of undeclared identifier 'CLONE_NOOWNERCOPY'`" build error on
1780 macOS 10.12.
897b6065
JR
1781
1782- Fixed build problems related to missing AVX2 and AVX512 support on older
1783 macOS versions.
1784
1785- Fixed static linkage with libgcc and libstdc++ for MinGW and made it
1786 optional.
1787
63239e95 1788- Fixed conditional compilation of "`robust mutex`" code for the inode cache
897b6065
JR
1789 routines.
1790
1791- Fixed badly named man page filename (`Ccache.1` instead of `ccache.1`).
1792
1793- Disabled some tests on ancient Clang versions.
1794
1795
63239e95 1796=== Other improvements and fixes
897b6065
JR
1797
1798- The man page is now built by default if the required tools are available.
1799
1800- Use CMake `A2X_EXE` variable instead of hardcoded `a2x`.
1801
1802- Improved build errors when building ccache with very old compiler versions.
1803
63239e95 1804- Fall back to version "`unknown`" when Git is not installed.
897b6065
JR
1805
1806- Documented the relationship between `CCACHE_DIR` and `-d/--directory`.
1807
1808- Fixed incorrect reference and bad markup in the manual.
1809
1810
63239e95
JR
1811== Ccache 4.0
1812
7c44b8c4 1813Release date: 2020-10-18
c7f0a540 1814
c7f0a540 1815
63239e95 1816=== Summary of major changes
55628021
JR
1817
1818- Changed the default cache directory location to follow the XDG base directory
1819 specification.
1820
1821- Changed compression algorithm from Deflate (zlib) to Zstandard, enabled by
1822 default.
1823
1824- Added functionality for recompressing cache content with a higher compression
1825 level.
1826
1827- Changed hash algorithm from MD4 to BLAKE3.
1828
1829- Added checksumming with XXH3 to detect data corruption.
1830
1831- Improved cache directory structure.
1832
63239e95 1833- Added support for using file cloning (AKA "`reflinks`").
55628021 1834
63239e95 1835- Added an experimental "`inode cache`" for file hashes.
55628021
JR
1836
1837
63239e95 1838=== Compatibility notes
65f6545e
JR
1839
1840- The default location of the cache directory has changed to follow the XDG
395c1c7f 1841 base directory specification (<<Detailed functional changes,more details
55628021
JR
1842 below>>). This means that scripts can no longer assume that the cache
1843 directory is `~/.ccache` by default. The `CCACHE_DIR` environment variable
1844 still overrides the default location just like before.
65f6545e 1845
55628021 1846- The cache directory structure has changed compared to previous versions
395c1c7f 1847 (<<Detailed functional changes,more details below>>). This means that ccache
55628021
JR
1848 4.0 will not share cache results with earlier versions. It is however safe to
1849 run ccache 4.0 and earlier versions against the same cache directory: cache
1850 bookkeeping, statistics and cleanup are backward compatible, with the minor
63239e95 1851 exception that some statistics counters incremented by ccache 4.0 won't be
55628021 1852 visible when running `ccache -s` with an older version.
65f6545e
JR
1853
1854
63239e95 1855=== Changed tooling
c7f0a540 1856
55628021 1857- CMake is now used instead of Autoconf for configuration and building.
c7f0a540 1858
e2d61546
JR
1859- A C++11 compiler, a C99 compiler and CMake 3.4.3 or newer are now required to
1860 build ccache.
c7f0a540 1861
e2d61546 1862- Ccache can now be built using Microsoft Visual C++.
c7f0a540 1863
c7f0a540 1864
63239e95 1865=== Detailed functional changes
c7f0a540 1866
63239e95 1867- All data of a cached result is now stored in a single file called "`result`"
55628021 1868 instead of up to seven files. This reduces inode usage and improves data
e2d61546 1869 locality.
c7f0a540 1870
e2d61546
JR
1871- Added compression of result and manifest files using the
1872 http://zstd.net[Zstandard] algorithm. Compression is enabled by default with
1873 compression level 1. This makes ccache able to store more data in the cache.
55628021
JR
1874 Previously compression using Deflate (zlib) was available but disabled by
1875 default. Files can be recompressed with another compression level later with
1876 the `-X/--recompress` option described further below.
f2341b2b 1877
55628021
JR
1878- Changed from MD4 to https://blake3.io[BLAKE3] for hashing input. This
1879 improves performance and reduces the risk of hash collisions.
26767846 1880
e2d61546
JR
1881- Added checksumming of result and manifest files using the
1882 http://xxhash.com[XXH3] algorithm to detect data corruption.
1883
1884- Ccache now follows the
1885 https://specifications.freedesktop.org/basedir-spec/[XDG base directory
1886 specification]. This means that the default cache directory on Unix systems
55628021 1887 is `$XDG_CACHE_HOME/ccache` (with `~/.cache/ccache` as the fallback if
e2d61546 1888 `XDG_CACHE_HOME` is not set) and the configuration file is
55628021
JR
1889 `$XDG_CONFIG_HOME/ccache/ccache.conf` (with `~/.config/ccache/ccache.conf` as
1890 the fallback). On macOS, the fallbacks are `~/Library/Caches/ccache` and
1891 `~/Library/Preferences/ccache/ccache.conf`. On Windows, the fallbacks are
e2d61546 1892 `%APPDATA%/ccache` and `%APPDATA%/ccache/ccache.conf`. Exception: If the
55628021
JR
1893 legacy `~/.ccache` directory exists, that directory is used as the default
1894 cache location and the configuration file is `~/.ccache/ccache.conf`.
e2d61546
JR
1895
1896- Cache statistics are now stored in files on cache level 2 to reduce lock
1897 contention when there are many parallel compilations.
1898
1899- An appropriate cache directory level structure is now chosen automatically.
1900 The `cache_dir_levels` (`CCACHE_NLEVELS`) configuration option has therefore
1901 been removed.
1902
63239e95 1903- Added an experimental "`inode cache`" for file hashes, allowing computed hash
e2d61546
JR
1904 values to be reused both within and between builds. The inode cache is off by
1905 default but can be enabled by setting `inode_cache` (`CCACHE_INODECACHE`) to
1906 `true`.
1907
63239e95 1908- Added support for using file cloning (AKA "`reflinks`") on Btrfs, XFS and APFS
e2d61546
JR
1909 to copy data to and from the cache very efficiently.
1910
1911- Two measures have been implemented to make the hard link mode safer:
1912 hard-linked files are made read-only and inadvertent content changes that
1913 affect file size are detected.
1914
1915- Added a command line option `-x/--show-compression` which shows statistics
1916 about cache compression.
1917
55628021
JR
1918- Added a command line option `-X/--recompress` which recompresses the cache
1919 data with another compression level or makes it uncompressed. If you choose
1920 to disable compression by default, or choose to use a compression level with
e2d61546
JR
1921 a low compression ratio, you can recompress the cache with a higher
1922 compression level after the build or at another time when there are more CPU
55628021
JR
1923 cycles available, for instance every night. Only files that are currently
1924 compressed with a different level than the wanted level will be recompressed.
e2d61546 1925
55628021
JR
1926- Added a command line option `--evict-older-than` which removes cache entries
1927 older than a certain age.
e2d61546 1928
55628021
JR
1929- Added a command line option `-d/--directory` which specifies a cache
1930 directory to operate on. It can be used instead of setting `CCACHE_DIR`
e2d61546 1931 temporarily.
d8e2ab9a
JR
1932
1933- A progress bar has been added to show the progress of time-consuming options
e2d61546
JR
1934 like `-c/--cleanup`, `-C/--clear`, `--evict-older-than`,
1935 `-x/--show-compression` and `-X/--recompress`.
26767846 1936
721cfeea 1937- When supported by the CPU, a SIMD-friendly (using AVX2) algorithm is now used
1819896e
JR
1938 to scan input source code for `+__DATE__+`, `+__TIME__+` and `+__TIMESTAMP__+`
1939 macros. This can decrease the number of CPU cycles for a direct cache hit with
1940 up to 15% in some cases.
721cfeea 1941
e2d61546
JR
1942- Some unnecessary `stat(2)` system calls are now avoided when verifying header
1943 files.
81f5f991 1944
55628021
JR
1945- Compiler diagnostic messages are now always cached in color. Ccache then
1946 strips the color codes on the fly when requested explicitly by a command line
1c6ccf18
MW
1947 option or when stderr does not refer to a TTY. This allows IDEs and terminals
1948 to share cached compilation results.
1949
20bbd39d
JR
1950- The configuration option `compiler` (`CCACHE_COMPILER`) now always takes
1951 effect if specified. Previously, the configuration option was only used when
1952 the compiler specified on the command line was looked up via `PATH` (i.e.,
1953 not when an absolute path was specified).
1954
55628021
JR
1955- Added optional logging to syslog if `log_file` (`CCACHE_LOGFILE`) is set to
1956 `syslog`.
e2d61546 1957
63239e95
JR
1958- The compiler option `-fmodules` is now handled in the "`depend mode`". If
1959 "`depend mode`" is disabled the option is still considered too hard and ccache
55628021 1960 will fall back to running the compiler.
e2d61546 1961
1da6d7ed
JR
1962- Ccache can now cache compilations with coverage notes (`.gcno` files)
1963 produced by GCC 9+ in combination with `-fprofile-dir=dir`.
1964
e2d61546
JR
1965- `realpath(3)` is no longer used for normalization when computing relative
1966 paths. This makes it possible to get cache hits when the source or build
1967 directory is a symbolic link to an absolute path that includes unstable
1968 information like build IDs or timestamps.
1969
55628021
JR
1970- Added an `ignore_options` (`CCACHE_IGNOREOPTIONS`) configuration option which
1971 makes it possible to exclude compiler options from the hash.
e2d61546
JR
1972
1973- Added an `absolute_paths_in_stderr` (`CCACHE_ABSSTDERR`) configuration option
55628021
JR
1974 which makes ccache rewrite absolute paths in compiler warnings and errors to
1975 relative.
e2d61546
JR
1976
1977- Improved handling of umask. The configured `umask` (`CCACHE_UMASK`) is now
1978 only applied to files and directories in the cache directory. Previously the
1979 umask was applied to all files produced by ccache and the executed compiler.
1980
1981- Ccache is now able to share cache entries for different object file names
1982 when using `-MD` or `-MMD`.
1983
63239e95 1984- Clang's `-Xclang` (used by CMake for precompiled headers),
e2d61546
JR
1985 `-fno-pch-timestamp`, `-emit-pch`, `-emit-pth` and `-include-pth` options are
1986 now understood.
1987
63239e95
JR
1988- Added support for the HIP ("`C++ Heterogeneous-Compute Interface for
1989 Portability`") language.
e2d61546
JR
1990
1991- The manifest format now allows for header files larger than 4 GiB.
1992
1819896e 1993- Made it possible to once again cache compilations with `+__DATE__+` in the
e2d61546
JR
1994 source code.
1995
1819896e 1996- Added handling of the `+__TIMESTAMP__+` macro.
e2d61546
JR
1997
1998- An absolute input source path is now rewritten to a relative path when using
1999 `base_dir`.
2000
2001- `waitpid` system calls interrupted by a signal are now handled correctly.
2002
2003- Made handling of `.dwo` files and interaction between `-gsplit-dwarf` and
2004 other `-g*` options more robust.
2005
63239e95
JR
2006- The "`couldn't find compiler`" statistics counter is no longer incremented
2007 when ccache exits with a fatal error.
e2d61546
JR
2008
2009- Failure to run a `compiler_check` command is no longer a fatal error.
2010
2011- Added command line options `--dump-result` and `--extract-result` for
2012 inspecting and extracting result files.
2013
2014- Added a command line option `--checksum-file` for debugging or evaluating the
2015 checksum algorithm.
2016
55628021
JR
2017- Improved error message for `ccache -o=K=V` (trying to set a configuration
2018 option named `=K`).
e2d61546
JR
2019
2020- Made timestamps in statistics files Y2038-proof.
2021
55628021
JR
2022- Removed code for populating a newly created configuration file with max cache
2023 size and max files values for cache directories created by ccache versions
2024 older than 3.2 (released 2014).
e2d61546 2025
55628021 2026- Removed knowledge about a top-level `stats` file created by ccache versions
e2d61546
JR
2027 older than 3.1 (released 2010).
2028
2029
63239e95 2030=== Other improvements
e2d61546
JR
2031
2032- Improved help text and documentation of command line options.
2033
2034- Improved documentation of the `base_dir` configuration option.
2035
2036- Improved documentation of preprocessor and direct modes.
2037
2038- Added HTML anchors to configuration options in the manual so that it is
55628021 2039 possible link to a specific option.
e2d61546 2040
63239e95 2041- Tweaked placement of "`(readonly)`" in output of `ccache -s`.
e2d61546
JR
2042
2043- Improved visibility of color output from the test suite.
2044
20bbd39d
JR
2045- Fixed a problem when running the test suite with Clang without a libgcov
2046 library available.
2047
e2d61546
JR
2048- Fixed test suite problems on macOS.
2049
2050- Disabled hardlink tests on AFS since it lacks such support.
2051
2052- Disabled read-only tests on file systems that lack such support.
c7f0a540 2053
93f10e15 2054
eb9367a7 2055== Ccache 3.7.12
632f2e49
JR
2056
2057Release date: 2020-10-01
2058
63239e95
JR
2059
2060=== Bug fixes
632f2e49
JR
2061
2062- Coverage files (`.gcno`) produced by GCC 9+ when using `-fprofile-dir=dir`
2063 are now handled gracefully by falling back to running the compiler.
2064
2065- Fixed writing to log file larger than 2 GiB when running ccache compiled in
2066 32-bit mode.
2067
2068
63239e95 2069=== Other
632f2e49
JR
2070
2071- Improved documentation about sharing a cache on NFS.
2072
2073- Fixed test case failures with old objdump versions.
2074
2075- Fixed test case failures with GCC 4.4.
2076
2077
eb9367a7 2078== Ccache 3.7.11
a2d8f496
JR
2079
2080Release date: 2020-07-21
2081
63239e95
JR
2082
2083=== Bug fixes
a2d8f496
JR
2084
2085- Added knowledge about `-fprofile-{correction,reorder-functions,values}`.
2086
2087- ccache now handles the Intel compiler option `-xCODE` (where `CODE` is a
2088 processor feature code) correctly.
2089
63239e95 2090- Added support for NVCC's `-Werror` and `--Werror` options.
a2d8f496
JR
2091
2092
63239e95 2093=== Other
a2d8f496 2094
63239e95 2095- ccache's "`Directory is not hashed if using -gz[=zlib]`" tests are now skipped
a2d8f496
JR
2096 for GCC 6.
2097
2098
eb9367a7 2099== Ccache 3.7.10
63239e95 2100
1da21b36
JR
2101Release date: 2020-06-22
2102
63239e95
JR
2103
2104=== Bug fixes
1da21b36
JR
2105
2106- Improved handling of profiling options. ccache should now work correctly for
2107 profiling options like `-fprofile-{generate,use}[=path]` for GCC ≥ 9 and
2108 Clang as well as `-fauto-profile[=path]` and the Clang-specific
2109 `-fprofile-instr-{generate,use}[=path]` and `-fprofile-sample-{use,accurate}`
2110 options.
2111
2112- ccache now copies files directly from the cache to the destination file
2113 instead of via a temporary file. This avoids problems when using filenames
63239e95 2114 long enough to be near the file system's filename max limit.
1da21b36
JR
2115
2116- When the hard-link mode is enabled, ccache now only uses hard links for
2117 object files, not other files like dependency files. This is because
63239e95 2118 compilers unlink object files before writing to them but they don't do that
1da21b36
JR
2119 for dependency files, so the latter can become overwritten and therefore
2120 corrupted in the cache.
2121
2122- Fixed a glitch related to hard-link mode and an empty cache.
2123
2124- ccache now supports the ccache.conf file to be a symlink.
2125
2126- Temporary files are now deleted immediately on signals like SIGTERM and
2127 SIGINT instead of some time later in a cleanup phase.
2128
63239e95 2129- Fixed a bug that affected ccache's `-o/--set-config` option for the
1da21b36
JR
2130 `base_dir` and `cache_dir_levels` keys.
2131
2132
eb9367a7 2133== Ccache 3.7.9
63239e95 2134
59a65ba3
JR
2135Release date: 2020-03-29
2136
63239e95
JR
2137
2138=== Bug fixes
59a65ba3
JR
2139
2140- Fixed replacing of /dev/null when building as root with hard link mode
2141 enabled and using `-o /dev/null`.
2142
63239e95
JR
2143- Removed incorrect assertion resulting in "`ccache: error: Internal error in
2144 format`" when using `-fdebug-prefix-map=X=` with X equal to `$PWD`.
59a65ba3
JR
2145
2146
63239e95 2147=== Other
59a65ba3
JR
2148
2149- Improved CUDA/NVCC support: Recognize `-dc` and `-x cu` options.
2150
2151- Improved name of temporary file used in NFS-safe unlink.
2152
2153
eb9367a7 2154== Ccache 3.7.8
63239e95 2155
e3f66e9c
JR
2156Release date: 2020-03-16
2157
63239e95
JR
2158
2159=== Bug fixes
e3f66e9c
JR
2160
2161- Use `$PWD` instead of the real CWD (current working directory) when checking
2162 for CWD in preprocessed output. This fixes a problem when `$PWD` includes a
2163 symlink part and the user has set `hash_dir = false`.
2164
2165- Rewrote the Windows version of the lockfile routines. This should mitigate
2166 several problems with the old implementation.
2167
2168- If `localtime_r` fails the epoch time is now logged instead of garbage.
2169
2170
63239e95 2171=== Other
e3f66e9c
JR
2172
2173- Improved error message when a boolean environment variable has an invalid
2174 value.
2175
2176- Improved the regression fix in ccache 3.7.5 related to not passing
2177 compilation-only options to the preprocessor.
2178
63239e95 2179- ccache's PCH test suite now skips running the tests if it detects broken PCH
e3f66e9c
JR
2180 compiler support.
2181
2182- Fixed unit test failure on Windows.
2183
63239e95 2184- Fixed "`stringop-truncation`" build warning on Windows.
e3f66e9c 2185
63239e95 2186- Improved "`x_rename`" implementation on Windows.
e3f66e9c
JR
2187
2188- Improved removal of temporary file when rewriting absolute paths to relative
2189 in the dependency file.
2190
63239e95 2191- Clarified "`include_file_ctime sloppiness`" in the Performance section in the
e3f66e9c
JR
2192 manual.
2193
2194
eb9367a7 2195== Ccache 3.7.7
63239e95 2196
047af8d9
JR
2197Release date: 2020-01-05
2198
63239e95
JR
2199
2200=== Bug fixes
047af8d9
JR
2201
2202- Fixed a bug related to object file location in the dependency file (if using
2203 `-MD` or `-MMD` but not `-MF` and the build directory is not the same as the
2204 source directory then the object file location in the `.d` file would become
2205 incorrect). This fixes regression in ccache 3.7.5 introduced by the bug fix
2206 related to EDG-based compilers. Note that this removes support for EDG-based
2207 compilers again. (A better fix for this is planned for ccache 4.0.)
2208
2209- Removed the unify mode since it has bugs and shortcomings that are non-trivial
63239e95 2210 or impossible to fix: it doesn't work with the direct mode, it doesn't handle
047af8d9 2211 C++ raw strings correctly, it can give false cache hits for `.incbin`
63239e95 2212 directives, it's turned off when using `-g` and it can make line numbers in
047af8d9
JR
2213 warning messages and `__LINE__` macros incorrect.
2214
2215- mtime and ctime values are now stored in the manifest files only when
2216 sloppy_file_stat is set. This avoids adding superfluous manifest file entries
2217 on direct mode cache misses.
2218
63239e95 2219- A "`Result:`" line is now always printed to the log.
047af8d9 2220
63239e95 2221- The "`cache miss`" statistics counter will now be updated for read-only cache
047af8d9
JR
2222 misses, making it consistent with the cache hit case.
2223
2224
eb9367a7 2225== Ccache 3.7.6
63239e95 2226
5b23cf1f 2227Release date: 2019-11-17
038e1d4b 2228
038e1d4b 2229
63239e95
JR
2230=== Bug fixes
2231
2232- The opt-in "`file_macro sloppiness`" mode has been removed so that the input
038e1d4b 2233 file path now is always included in the direct mode hash. This fixes a bug
63239e95
JR
2234 that could result in false cache hits in an edge case when "`file_macro
2235 sloppiness`" is enabled and several identical source files include a relative
038e1d4b
JR
2236 header file with the same name but in different directories.
2237
2238- Statistics files are no longer lost when the filesystem of the cache is full.
2239
2240- Bail out on too hard Clang option `-MJarg` (in addition to the previous
2241 bailout of `-MJ arg`).
2242
2243- Properly handle color diagnostics in the depend mode as well.
2244
2245
eb9367a7 2246== Ccache 3.7.5
63239e95 2247
e8ac1280 2248Release date: 2019-10-22
326cb9b4 2249
63239e95
JR
2250
2251=== New features
c4324149
JR
2252
2253- Added support for `-MF=arg` (with an extra equal sign) as understood by
2254 EDG-based compilers.
2255
2256
63239e95 2257=== Bug fixes
326cb9b4
JR
2258
2259- Fixed a regression in 3.7.2 that could result in a warning message instead of
63239e95 2260 an error in an edge case related to usage of "`-Werror`".
326cb9b4 2261
b371cee8 2262- An implicit `-MQ` is now passed to the preprocessor only if the object file
e8ac1280 2263 extension is non-standard. This will make it easier to use EDG-based
63239e95 2264 compilers (e.g. GHS) which don't understand `-MQ`. (This is a bug fix of the
b371cee8
JR
2265 corresponding improvement implemented in ccache 3.4.)
2266
e8ac1280
JR
2267- ccache now falls back to running the real compiler instead of failing fataly
2268 if an internal temporary file is missing after compilation.
2269
2270- Fixed a crash if localtime returns null pointer in localtime_r replacement.
2271
2272- Fixed header file dependency tracking when building ccache itself.
2273
2274- Fixed warning during configure in out-of-tree build in developer mode.
2275
326cb9b4 2276
eb9367a7 2277== Ccache 3.7.4
63239e95 2278
63c8045d
JR
2279Release date: 2019-09-12
2280
63239e95
JR
2281
2282=== Improvements
63c8045d 2283
6786aa81 2284- Added support for the `-gz[=type]` compiler option (previously ccache would
63239e95 2285 think that "`-gz`" alone would enable debug information, thus potentially
6786aa81 2286 including the current directory in the hash).
63c8045d 2287
63239e95
JR
2288- Added support for converting paths like "`/c/users/...`" into relative paths
2289 on Windows.
2290
63c8045d 2291
eb9367a7 2292== Ccache 3.7.3
63c8045d 2293
a3386f95 2294Release date: 2019-08-17
93f10e15 2295
93f10e15 2296
63239e95
JR
2297=== Bug fixes
2298
2299- The cache size (which is counted in "`used disk blocks`") is now correct on
93f10e15
JR
2300 filesystems that use more or less disk blocks than conventional filesystems,
2301 e.g. ecryptfs or btrfs/zfs with transparent compression. This also fixes a
63239e95
JR
2302 related problem with ccache's own test suite when run on such file systems.
2303
2304- Fixed a regression in 3.7.2 when using the compiler option "`-Werror`" and
2305 then "`-Wno-error`" later on the command line.
93f10e15 2306
c7f0a540 2307
eb9367a7 2308== Ccache 3.7.2
605b998b 2309
0e85c9cb
JR
2310Release date: 2019-07-19
2311
0e85c9cb 2312
63239e95
JR
2313=== Bug fixes
2314
2315- The compiler option `-gdwarf*` no longer forces "`run_second_cpp = true`".
0e85c9cb
JR
2316
2317- Added verification that the value passed to the `-o/--set-config` option is
2318 valid.
2319
2320- Fixed detection of precompiled headers in the depend mode.
2321
2322- Bail out on too hard Clang option `-ftime-trace`.
2323
2324- ccache now updates the correct stats file when adding/updating manifest
2325 files. This bug previously made the file and size statistics counters
2326 incorrect over time.
2327
2328- Fixed warnings from Clang about unused arguments during preprocessing.
2329
2330- Unknown manifest versions are now handled gracefully in `--dump-manifest`.
2331
63239e95 2332- Fixed `make check` with "`funny`" locales.
0e85c9cb
JR
2333
2334
63239e95 2335=== Documentation
0e85c9cb
JR
2336
2337- Added a hint about not running `autogen.sh` when building from a release
2338 archive.
2339
2340- Mention that `xsltproc` is needed when building from the source repository.
2341
2342
eb9367a7 2343== Ccache 3.7.1
63239e95 2344
9e1e3aff 2345Release date: 2019-05-01
b47ddf67 2346
63239e95
JR
2347
2348=== Changes
b47ddf67
JR
2349
2350- Fixed a problem when using the compiler option `-MF /dev/null`.
2351
2352- Long commandlines are now handled gracefully on Windows by using the `@file`
2353 syntax to avoid hitting the commandline size limit.
2354
63239e95 2355- Fixed complaint from GCC 9's `-Werror=format-overflow` when compiling ccache
b47ddf67
JR
2356 itself.
2357
2358
eb9367a7 2359== Ccache 3.7
63239e95 2360
cb5c262b 2361Release date: 2019-04-23
514a08e4 2362
63239e95
JR
2363
2364=== Changes
514a08e4 2365
2040286c 2366- Fixed crash when the debug mode is enabled and the output file is in a
514a08e4
JR
2367 non-writable directory, e.g. when the output file is `/dev/null`.
2368
2040286c 2369- Fixed an issue when printing very large log messages to the debug log.
a68a659b 2370
2040286c 2371- Fixed bugs related to support for `-gsplit-dwarf`. Previously ccache could
35bff527 2372 produce an incorrect link to the `.dwo` file in the `.o` file.
c1bc408f 2373
2040286c 2374- Compilations with /dev/null as the input file are now cached.
7dfb227e 2375
3bbf2020 2376- ccache has learned how to construct the object filename if no `-o` option is
89bc3078
JR
2377 given and the source filename does not include a `.` or ends with a `.`.
2378
2040286c 2379- Fixed a temporary file leak when the depend mode is enabled and the compiler
f54064e9
JR
2380 produces standard error output.
2381
2040286c 2382- Fixed a bug in the depend mode where a manifest hash only could be associated
14243f63 2383 with one set of header dependencies.
05127af3 2384
2040286c 2385- Manifest files did not get marked as used on direct cache hits, so the LRU
e1c5d0b5 2386 cache cleanup would incorrectly remove them eventually. This has been fixed.
128109eb 2387
e1c5d0b5
JR
2388- The rewriting of absolute paths into relative paths in the dependency file
2389 has been enabled in the depend mode as well.
5c392706 2390
e1c5d0b5
JR
2391- ccache now ignores unknown keys in configuration files for forward
2392 compatibility.
22db9ed8 2393
2040286c 2394- Rearranged command-line options into sections in the help text.
2db06e38 2395
2040286c 2396- Documented the previously undocumented `--dump-manifest` and `--hash-file`
e1d01d39 2397 options (only useful for debugging ccache itself).
2db06e38 2398
2040286c 2399- Added missing documentation for the command-line option `-k/--get-config`
2db06e38
JR
2400 added in ccache 3.5.
2401
2040286c 2402- Renamed the `--print-config` command to `--show-config`.
2db06e38 2403
2040286c 2404- Added a new `--print-stats` command that prints statistics counters in
2db06e38
JR
2405 machine-parsable (tab-separated) format.
2406
2040286c 2407- ccache no longer creates a missing output directory, thus mimicking the
63239e95 2408 compiler behavior for `-o out/obj.o` when `out` doesn't exist.
377efaef 2409
63239e95
JR
2410- `-fdebug-prefix-map=ARG`, `-ffile-prefix-map=ARG` and `-fmacro-prefix-map=ARG`
2411 are now included in the hash, but only the part before "`ARG`". This fixes a
2412 bug where compiler feature detection of said flags would not work correctly
2413 with ccache.
64f12a4f 2414
2040286c 2415- Bail out on too hard compiler option `-gtoggle`.
22754929 2416
e1c5d0b5
JR
2417- Bail out on too hard Clang options `--analyze` and `-analyze`.
2418
2040286c 2419- Improved debug logging of file hashes in depend mode.
32ca5c13 2420
2040286c 2421- Improved handling of various `-g*` options. In particular, ccache now
6d71b617
JR
2422 understands that `-g0` cancels out previous `-g* options`.
2423
e1c5d0b5
JR
2424- Worked around a problem with Automake related to `.d` files when using the
2425 hard link mode.
0c07c337 2426
cf604c56
JR
2427- Added opt-in (at configure time) support for enabling trace logs for
2428 profiling ccache itself. See `doc/DEVELOPER.md` in the code tree for more
2429 information
2430
61c65322
JR
2431- Removed support for Fortran 77 again. Some Fortran support was added in
2432 ccache 3.3, but the implementation did not work when Fortran modules are
2433 involved.
2434
514a08e4 2435
eb9367a7 2436== Ccache 3.6
63239e95 2437
89637e57 2438Release date: 2019-01-14
c729368f 2439
c729368f 2440
63239e95
JR
2441=== Changes
2442
2443- ccache now has an opt-in "`depend mode`". When enabled, ccache never executes
665320c5
JR
2444 the preprocessor, which results in much lower cache miss overhead at the
2445 expense of a lower potential cache hit rate. The depend mode is only possible
8b0d3022 2446 to use when the compiler option `-MD` or `-MMD` is used.
665320c5 2447
63239e95 2448- Added support for GCC's `-ffile-prefix-map` option. The `-fmacro-prefix-map`
c729368f
JR
2449 option is now also skipped from the hash.
2450
9e24aaf6 2451- Added support for multiple `-fsanitize-blacklist` arguments.
ab5c8304 2452
8b0d3022
JR
2453- ccache now includes the environment variables `LANG`, `LC_ALL`, `LC_CTYPE`
2454 and `LC_MESSAGES` in the hash since they may affect localization of compiler
2455 warning messages. Set sloppiness to `locale` to opt out of this.
1e800ef2 2456
ab5c8304
JR
2457- Fixed a problem due to Clang overwriting the output file when compiling an
2458 assembler file.
2459
63239e95 2460- Clarified the manual to explain the reasoning behind the "`file_macro`"
ab5c8304
JR
2461 sloppiness setting in a better way.
2462
981230ee
JR
2463- ccache now handles several levels of nonexistent directories when rewriting
2464 absolute paths to relative.
2465
8b0d3022
JR
2466- A new sloppiness setting `clang_index_store` makes ccache skip the Clang
2467 compiler option `-index-store-path` and its argument when computing the
066f6f26 2468 manifest hash. This is useful if you use Xcode, which uses an index store
63239e95 2469 path derived from the local project path. Note that the index store won't be
066f6f26
JR
2470 updated correctly on cache hits if you enable this option.
2471
198aceec
JR
2472- Rename sloppiness `no_system_headers` to `system_headers` for consistency
2473 with other options. `no_system_headers` can still be used as an
2474 (undocumented) alias.
2475
63239e95 2476- The GCC variables "`DEPENDENCIES_OUTPUT`" and "`SUNPRO_DEPENDENCIES`" are now
58d78317
JR
2477 supported correctly.
2478
1819896e
JR
2479- The algorithm that scans for `__DATE_` and `+__TIME__+` tokens in the hashed
2480 source code now doesn't produce false positives for tokens where `+__DATE__+`
2481 or `+__TIME__+` is a substring.
8602e1b1 2482
c729368f 2483
eb9367a7 2484== Ccache 3.5.1
63239e95 2485
c3511dcd
JR
2486Release date: 2019-01-02
2487
63239e95
JR
2488
2489=== Changes
c3511dcd
JR
2490
2491- Added missing getopt_long.c source file to release archive.
2492
2493- Fixed (harmless) compiler warnings when building ccache object files.
2494
2495- CFLAGS is no longer passed to the linker when linking ccache.
2496
2497- Improved development mode build flags.
2498
2499
eb9367a7 2500== Ccache 3.5
63239e95 2501
fb0fec27 2502Release date: 2018-10-15
d653cfae 2503
63239e95
JR
2504
2505=== Changes
d653cfae 2506
f1d38156 2507- Added a boolean `debug` (`CCACHE_DEBUG`) configuration option. When enabled,
63239e95
JR
2508 ccache will create per-object debug files that are helpful e.g. when debugging
2509 unexpected cache misses. See also the new "`Cache debugging`" section in the
2510 manual.
f1d38156 2511
d653cfae
JR
2512- Renamed `CCACHE_CC` to `CCACHE_COMPILER` (keeping the former as a deprecated
2513 alias).
2514
9aee2de1
JR
2515- Added a new command-line option `-k/--get-config` that prints the value of a
2516 config key.
2517
018c74e3
JR
2518- It is now possible to let ccache hash a precomputed checksum file instead of
2519 the full content of a precompiled header. This can save time for large
2520 precompiled headers. Note that the build system needs to keep the checksum
2521 file in sync with the precompiled header for this to work.
2522
105f611f
JR
2523- Improved performance substantially when using `hash_dir = false` on platforms
2524 like macOS where `getcwd()` is slow.
2525
63239e95 2526- Added "`stats updated`" timestamp in `ccache -s` output. This can be useful if
2040286c 2527 you wonder whether ccache actually was used for your last build.
5779e976 2528
63239e95
JR
2529- Renamed "`stats zero time`" to "`stats zeroed`" and documented it. The counter
2530 is also now only present in `ccache -s` output when `ccache -z` actually has
2040286c 2531 been called.
737bb194 2532
8d6e8783
JR
2533- The content of the `-fsanitize-blacklist` file is now included in the hash,
2534 so updates to the file will now correctly result in separate cache entries.
2535
63239e95 2536- It's now possible to opt out of building and installing man pages when
dc252d9e
JR
2537 running `make install` in the source repository.
2538
63239e95
JR
2539- If the compiler type can't be detected (e.g. if it is named `cc`), use safer
2540 defaults that won't trip up Clang.
57b0c186
JR
2541
2542- Made the ccache test suite work on FreeBSD.
2543
f1d38156
JR
2544- Added `file_stat_matches_ctime` option to disable ctime check if
2545 `file_stat_matches` is enabled.
554195a8 2546
63239e95
JR
2547- Made "`./configure --without-bundled-zlib`" do what's intended.
2548
f6596633 2549
eb9367a7 2550== Ccache 3.4.3
dc252d9e 2551
a8f1d858 2552Release date: 2018-09-02
c90c1efb 2553
63239e95
JR
2554
2555=== Bug fixes
c90c1efb
JR
2556
2557- Fixed a race condition when creating the initial config file in the cache
2558 directory.
2559
f1d38156 2560- Bail out on too hard Clang option `-MJ`.
db3f3a9d 2561
b0d0b9ff
JR
2562- Bail out on too hard option `-save-temps=obj`.
2563
f1d38156 2564- Handle separate parameter to Clang option `-target` correctly.
14fcb7a1 2565
a8f1d858
JR
2566- Upgraded bundled zlib to version 1.2.11.
2567
c90c1efb 2568
eb9367a7 2569== Ccache 3.4.2
63239e95 2570
b1f509c3 2571Release date: 2018-03-25
a2280c55 2572
63239e95
JR
2573
2574=== Bug fixes
a2280c55 2575
4fc191a5
JR
2576- The cleanup algorithm has been fixed to not misbehave when files are removed
2577 by another process while the cleanup process is running. Previously, too many
2578 files could be removed from the cache if multiple cleanup processes were
2579 triggered at the same time, in extreme cases trimming the cache to a much
2580 smaller size than the configured limits.
2581
63239e95 2582- Correctly hash preprocessed headers located in a "`.gch directory`".
a2280c55
JR
2583 Previously, ccache would not pick up changes to such precompiled headers,
2584 risking false positive cache hits.
2585
418c419c
JR
2586- Fixed build failure when using the bundled zlib sources.
2587
058771c5 2588- ccache 3.3.5 added a workaround for not triggering Clang errors when a
63239e95 2589 precompiled header's dependency has an updated timestamp (but identical
058771c5
JR
2590 content). That workaround is now only applied when the compiler is Clang.
2591
3222af2d
JR
2592- Made it possible to perform out-of-source builds in dev mode again.
2593
a2280c55 2594
eb9367a7 2595== Ccache 3.4.1
63239e95 2596
aa7ef67b 2597Release date: 2018-02-11
5abab09d 2598
63239e95
JR
2599
2600=== Bug fixes
5abab09d
JR
2601
2602- Fixed printing of version number in `ccache --version`.
2603
2604
eb9367a7 2605== Ccache 3.4
63239e95 2606
25c0a5fa 2607Release date: 2018-02-11
5a25c489 2608
63239e95
JR
2609
2610=== New features and enhancements
5a25c489 2611
4f8e4c99
JR
2612- The compiler option form `--sysroot arg` is now handled like the documented
2613 `--sysroot=arg` form.
2614
999f0edb
JR
2615- Added support for caching `.su` files generated by GCC flag `-fstack-usage`.
2616
63239e95 2617- ccache should now work with distcc's "`pump`" wrapper.
9a3053a8 2618
ef05b88a
JR
2619- The optional unifier is no longer disabled when the direct mode is enabled.
2620
7429e2d4 2621- Added support for NVCC compiler options `--compiler-bindir/-ccbin`,
5a69b04a
JR
2622 `--output-directory/-odir` and `--libdevice-directory/-ldir`.
2623
267a8810
JR
2624- Boolean environment variable settings no longer accept the following
2625 (case-insensitive) values: `0`, `false`, `disable` and `no`. All other values
63239e95 2626 are accepted and taken to mean "`true`". This is to stop users from setting
267a8810 2627 e.g. `CCACHE_DISABLE=0` and then expect the cache to be used.
e7906f46 2628
efc76367
JR
2629- Improved support for `run_second_cpp = false`: If combined with passing
2630 `-fdirectives-only` (GCC) or `frewrite-includes` (Clang) to the compiler,
2631 diagnostics warnings and similar will be correct.
2632
76a9959f
JR
2633- An implicit `-MQ` is now passed to the preprocessor only if the object file
2634 extension is non-standard. This should make it easier to use EDG-based
63239e95 2635 compilers (e.g. GHS) which don't understand `-MQ`.
76a9959f 2636
a5b2c09d
JR
2637- ccache now treats an unreadable configuration file just like a missing
2638 configuration file.
2639
e3e2b296 2640- Documented more pitfalls with enabling `hard_link` (`CCACHE_HARDLINK`).
ddb73c65 2641
67fdd3b5
JR
2642- Documented caveats related to colored warnings from compilers.
2643
5a25c489 2644
63239e95 2645=== Bug fixes
2ca735db
JR
2646
2647- File size and number counters are now updated correctly when files are
2648 overwritten in the cache, e.g. when using `CCACHE_RECACHE`.
2649
7429e2d4 2650- `run_second_cpp` is now forced for NVCC.
5a69b04a 2651
7429e2d4 2652- Fixed how the NVCC options `-optf` and `-odir` are handled.
5a69b04a 2653
2ca735db 2654
eb9367a7 2655== Ccache 3.3.6
63239e95 2656
ec5c5c93 2657Release date: 2018-01-28
00bceb36 2658
63239e95 2659=== New features and enhancements
00bceb36
JR
2660
2661- Improved instructions on how to get cache hits between different working
2662 directories.
2663
2664
63239e95 2665=== Bug fixes
00bceb36
JR
2666
2667- Fixed regression in ccache 3.3.5 related to the `UNCACHED_ERR_FD` feature.
2668
2669
eb9367a7 2670== Ccache 3.3.5
63239e95 2671
14f77b6b 2672Release date: 2018-01-13
b8aeb982 2673
ab7407f7 2674
63239e95 2675=== New features and enhancements
ab7407f7
JR
2676
2677- Documented how automatic cache cleanup works.
2678
2679
63239e95 2680=== Bug fixes
b8aeb982
JR
2681
2682- Fixed a regression where the original order of debug options could be lost.
63239e95 2683 This reverts the "`Improved parsing of `-g*` options`" feature in ccache 3.3.
b8aeb982 2684
1ba81864
JR
2685- Multiple `-fdebug-prefix-map` options should now be handled correctly.
2686
855c9760
JR
2687- Fixed matching of directories in the `ignore_headers_in_manifest`
2688 configuration option.
2689
c4d1062e
JR
2690- Fixed detection of missing argument to `-opt`/`--options-file`.
2691
3c551395 2692- ccache now bails out when building a precompiled header if any of the
7429e2d4
JR
2693 corresponding header files has an updated timestamp. This fixes complaints
2694 from Clang.
3c551395 2695
04c60755
JR
2696- Fixed a bug related to erroneously storing a dependency file with absolute
2697 paths in the cache on a preprocessed hit.
2698
7784c422
JR
2699- `ccache -c/--cleanup` now works like documented: it just recalculates size
2700 counters and trims the cache to not exceed the max size and file number
63239e95
JR
2701 limits. Previously, the forced cleanup took "`limit_multiple`" into account,
2702 so that `ccache -c/--cleanup` by default would trim the cache to 80% of the
2703 max limit.
7784c422 2704
7429e2d4 2705- ccache no longer ignores linker arguments for Clang since Clang warns about
97e642a4
JR
2706 them.
2707
2708- Plugged a couple of file descriptor leaks.
2709
2710- Fixed a bug where ccache would skip hashing the compiler argument following a
2711 `-fno-working-directory`, `-fworking-directory`, `-nostdinc`, `-nostdinc++`,
2712 `-remap` or `-trigraphs` option in preprocessor mode.
2713
b8aeb982 2714
eb9367a7 2715== Ccache 3.3.4
63239e95 2716
06b49fcd 2717Release date: 2017-02-17
836fd687 2718
63239e95 2719=== New features and enhancements
ee624863
JR
2720
2721- Documented the different cache statistics counters.
2722
2723
63239e95 2724=== Bug fixes
836fd687
JR
2725
2726- Fixed a regression in ccache 3.3 related to potentially bad content of
2727 dependency files when compiling identical source code but with different
2728 source paths. This was only partially fixed in 3.3.2 and reverts the new
63239e95
JR
2729 "`Names of included files are no longer included in the hash of the compiler's
2730 preprocessed output`" feature in 3.3.
836fd687 2731
19ea3b56
JR
2732- Corrected statistics counter for `-optf`/`--options-file` failure.
2733
2734- Fixed undefined behavior warnings in ccache found by `-fsanitize=undefined`.
836fd687 2735
eb9367a7 2736== Ccache 3.3.3
63239e95 2737
fb005e8f 2738Release date: 2016-10-26
b6d7cf55 2739
63239e95
JR
2740
2741=== Bug fixes
b6d7cf55
JR
2742
2743- ccache now detects usage of `.incbin` assembler directives in the source code
2744 and avoids caching such compilations.
2745
2746
eb9367a7 2747== Ccache 3.3.2
63239e95 2748
3b6f1d32 2749Release date: 2016-09-28
9cffdc69 2750
63239e95
JR
2751
2752=== Bug fixes
00758023
JR
2753
2754- Fixed a regression in ccache 3.3 related to potentially bad content of
2755 dependency files when compiling identical source code but with different
2756 source paths.
2757
e07daecb
JR
2758- Fixed a regression in ccache 3.3.1: ccache could get confused when using the
2759 compiler option `-Wp,` to pass multiple options to the preprocessor,
2760 resulting in missing dependency files from direct mode cache hits.
2761
00758023 2762
eb9367a7 2763== Ccache 3.3.1
63239e95 2764
98d4e177 2765Release date: 2016-09-07
ec7329d3 2766
ec7329d3 2767
63239e95
JR
2768=== Bug fixes
2769
2770- Fixed a problem in the "`multiple `-arch` options`" support introduced in 3.3.
2040286c
JR
2771 When using the direct mode (the default), different combinations of `-arch`
2772 options were not detected properly.
98d4e177 2773
ec7329d3
JR
2774- Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
2775 path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
2776 (`CCACHE_CPP2`) is enabled.
2777
712a416d 2778
eb9367a7 2779== Ccache 3.3
63239e95 2780
a845892c 2781Release date: 2016-08-27
0220de9c 2782
63239e95 2783=== Notes
e527cccb
JR
2784
2785- A C99-compatible compiler is now required to build ccache.
2786
2787
63239e95 2788=== New features and enhancements
dbd4d671 2789
eb3148ca 2790- The configuration option `run_second_cpp` (`CCACHE_CPP2`) now defaults to
63239e95
JR
2791 true. This improves ccache's out-of-the-box experience for compilers that
2792 can't compile their own preprocessed output with the same outcome as if they
eb3148ca
JR
2793 compiled the real source code directly, e.g. newer versions of GCC and Clang.
2794
6d9cb3df
JR
2795- The configuration option `hash_dir` (`CCACHE_HASHDIR`) now defaults to true.
2796
5da046aa
JR
2797- Added a new `ignore_headers_in_manifest` configuration option, which
2798 specifies headers that should be ignored in the direct mode.
2799
2800- Added a new `prefix_command_cpp` (`CCACHE_PREFIX_CPP`) configuration option,
2801 which specifies one or several prefixes to add to the command line ccache
2802 uses when invoking the preprocessor.
2803
2804- Added a new `limit_multiple` (`CCACHE_LIMIT_MULTIPLE`) configuration option,
2805 which specifies how much of the cache to remove when cleaning.
2806
2807- Added a new `keep_comments_cpp` (`CCACHE_COMMENTS`) configuration option,
2808 which tells ccache not to discard the comments before hashing preprocessor
8b0d3022 2809 output. This can be used to check documentation with `-Wdocumentation`.
9ef346e6 2810
5da046aa 2811- Added a new sloppiness option `no_system_headers`, which tells ccache not to
1a4d4908
JR
2812 include system headers in manifest files.
2813
5da046aa
JR
2814- Added a new statistics counter that tracks the number of performed cleanups
2815 due to the cache size being over the limit. The value is shown in the output
63239e95 2816 of "`ccache -s`".
b05fe448 2817
5da046aa
JR
2818- Added support for relocating debug info directory using `-fdebug-prefix-map`.
2819 This allows for cache hits even when `hash_dir` is used in combination with
2820 `base_dir`.
661d5a1d 2821
63239e95 2822- Added a new "`cache hit rate`" field to the output of "`ccache -s`".
c91de3eb 2823
63239e95
JR
2824- Added support for caching compilation of assembler code produced by e.g. "`gcc
2825 -S file.c`".
5da046aa
JR
2826
2827- Added support for cuda including the -optf/--options-file option.
2828
2829- Added support for Fortran 77.
2830
63239e95 2831- Added support for multiple `-arch` options to produce "`fat binaries`".
5da046aa
JR
2832
2833- Multiple identical `-arch` arguments are now handled without bailing.
05f63894 2834
5dc1bd5f
JR
2835- The concatenated form of some long compiler options is now recognized, for
2836 example when using `-isystemPATH` instead of `-isystem PATH`.
2837
9612954e
JR
2838- If hard-linking is enabled and but fails (e.g. due to cross-device linking),
2839 ccache now falls back to copying instead of running the compiler.
2840
bcabf3e0
JR
2841- Made the `hash_dir` option only have effect when generating debug info.
2842
1cfdf735
JR
2843- ccache now knows how to convert absolute paths to relative paths inside
2844 dependency files when using `base_dir`.
2845
5dadfc93
JR
2846- Improved parsing of `-g*` options.
2847
4a8b98b4
OP
2848- Made ccache understand `-Wp,-D*` options.
2849
5da046aa
JR
2850- ccache now understands the undocumented `-coverage` (only one dash) GCC
2851 option.
5fcf3aa6 2852
63239e95 2853- Names of included files are no longer included in the hash of the compiler's
7d275112
JR
2854 preprocessed output. This leads to more potential cache hits when not using
2855 the direct mode.
2856
87e5aa12
JR
2857- Increased buffer size used when reading file data. This improves performance
2858 slightly.
2859
d0bc9d27 2860
63239e95 2861=== Bug fixes
b9b03031 2862
3f41319d
JR
2863- Bail out on too hard compiler option `-P`.
2864
7429e2d4 2865- Fixed Clang test suite when running on Linux.
661d5a1d 2866
6c3861e5
AB
2867- Fixed build and test for MinGW32 and Windows.
2868
b9b03031 2869
eb9367a7 2870== Ccache 3.2.9
63239e95 2871
ad8f7900 2872Release date: 2016-09-28
3ba2ca78 2873
63239e95
JR
2874
2875=== Bug fixes
3ba2ca78
JR
2876
2877- Fixed a regression in ccache 3.2.8: ccache could get confused when using the
2878 compiler option `-Wp,` to pass multiple options to the preprocessor,
2879 resulting in missing dependency files from direct mode cache hits.
2880
712a416d 2881
eb9367a7 2882== Ccache 3.2.8
63239e95 2883
de911861 2884Release date: 2016-09-07
86c8b055 2885
63239e95
JR
2886
2887=== Bug fixes
86c8b055 2888
026ba6b9
JR
2889- Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
2890 path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
2891 (`CCACHE_CPP2`) is enabled.
2892
86c8b055
JR
2893- ccache now understands the undocumented `-coverage` (only one dash) GCC
2894 option.
2895
2896
eb9367a7 2897== Ccache 3.2.7
63239e95 2898
cdfc2ed9 2899Release date: 2016-07-20
e76ba341 2900
63239e95
JR
2901
2902=== Bug fixes
e76ba341
JR
2903
2904- Fixed a bug which could lead to false cache hits for compiler command lines
2905 with a missing argument to an option that takes an argument.
2906
63239e95 2907- ccache now knows how to work around a glitch in the output of GCC 6's
221d05c9
JR
2908 preprocessor.
2909
e76ba341 2910
eb9367a7 2911== Ccache 3.2.6
63239e95 2912
238430fb 2913Release date: 2016-07-12
9bfc21b2 2914
9bfc21b2 2915
63239e95
JR
2916=== Bug fixes
2917
2918- Fixed build problem on QNX, which lacks "`SA_RESTART`".
9bfc21b2 2919
5af36c15 2920- Bail out on compiler option `-fstack-usage` since it creates a `.su` file
63239e95 2921 which ccache currently doesn't handle.
5af36c15 2922
d1217dd7
JR
2923- Fixed a bug where (due to ccache rewriting paths) the compiler could choose
2924 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
2925 is absolute and is a symlink.
2926
9bfc21b2 2927
eb9367a7 2928== Ccache 3.2.5
63239e95 2929
424d3ae1 2930Release date: 2016-04-17
c1104e2f 2931
80182248 2932
63239e95 2933=== New features and enhancements
b76d92e5 2934
7429e2d4 2935- Only pass Clang-specific `-stdlib=` to the preprocessor.
b76d92e5 2936
1fffcd04
JR
2937- Improved handling of stale NFS handles.
2938
63239e95 2939- Made it harder to misinterpret documentation of boolean environment settings'
f6dfd815
JR
2940 semantics.
2941
b76d92e5 2942
63239e95 2943=== Bug fixes
80182248
JR
2944
2945- Include m4 files used by configure.ac in the source dist archives.
2946
63239e95 2947- Corrected "`Performance`" section in the manual regarding `__DATE_`,
1819896e 2948 `+__TIME__+` and `+__FILE__+` macros.
5d8ba555 2949
3cd29099
JR
2950- Fixed build on Solaris 10+ and AIX 7.
2951
f93d2399
JR
2952- Fixed failure to create directories on QNX.
2953
63239e95 2954- Don't (try to) update manifest file in "`read-only`" and "`read-only direct`"
a7ab503f
JR
2955 modes.
2956
63239e95
JR
2957- Fixed a bug in caching of `stat` system calls in "`file_stat_matches
2958 sloppiness mode`".
5459b15a 2959
7429e2d4 2960- Fixed bug in hashing of Clang plugins, leading to unnecessary cache misses.
4e082d8e 2961
63239e95 2962- Fixed --print-config to show "`pch_defines sloppiness`".
5755f6a4 2963
63239e95 2964- The man page is now built when running "`make install`" from Git repository
23a462b6
JR
2965 sources.
2966
80182248 2967
eb9367a7 2968== Ccache 3.2.4
63239e95 2969
2254797f
JR
2970Release date: 2015-10-08
2971
f74c7610 2972
63239e95 2973=== Bug fixes
f74c7610
JR
2974
2975- Fixed build error related to zlib on systems with older make versions
2976 (regression in ccache 3.2.3).
2977
1d075b25
JR
2978- Made conversion-to-bool explicit to avoid build warnings (and potential
2979 runtime errors) on legacy systems.
2980
737c96fa
JR
2981- Improved signal handling: Kill compiler on SIGTERM; wait for compiler to exit
2982 before exiting; die appropriately.
4fdb9580 2983
e8b42dce
JR
2984- Minor fixes related to Windows support.
2985
1eef4547
JR
2986- The correct compression level is now used if compression is requested.
2987
5a8efdfe
JR
2988- Fixed a bug where cache cleanup could be run too early for caches larger than
2989 64 GiB on 32-bit systems.
2990
f74c7610 2991
eb9367a7 2992== Ccache 3.2.3
63239e95 2993
4cad46e8
JR
2994Release date: 2015-08-16
2995
0220de9c 2996
63239e95 2997=== New features and enhancements
dbd4d671
JR
2998
2999- Added support for compiler option `-gsplit-dwarf`.
3000
3001
63239e95 3002=== Bug fixes
0220de9c
JR
3003
3004- Support external zlib in nonstandard directory.
3005
94085e8a
JR
3006- Avoid calling `exit()` inside an exit handler.
3007
6c692f07
JR
3008- Let exit handler terminate properly.
3009
58f9abf6
MM
3010- Bail out on compiler option `--save-temps` in addition to `-save-temps`.
3011
63239e95 3012- Only log "`Disabling direct mode`" once when failing to read potential include
0184e4cc
JR
3013 files.
3014
0220de9c 3015
eb9367a7 3016== Ccache 3.2.2
63239e95 3017
10c116e3
JR
3018Release date: 2015-05-10
3019
d2786183 3020
63239e95 3021=== New features and enhancements
76997f0d
JR
3022
3023- Added support for `CCACHE_COMPILERCHECK=string:<value>`. This is a faster
63239e95 3024 alternative to `CCACHE_COMPILERCHECK=<command>` if the command's output can
76997f0d
JR
3025 be precalculated by the build system.
3026
3c0ebfe0
JR
3027- Add support for caching code coverage results (compiling for gcov).
3028
76997f0d 3029
63239e95 3030=== Bug fixes
d2786183
JR
3031
3032- Made hash of cached result created with and without `CCACHE_CPP2` different.
3033 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
3034 clear the cache to get new results.
3035
63239e95
JR
3036- Don't try to reset a nonexistent stats file. This avoids "`No such file or
3037 directory`" messages in the ccache log when the cache directory doesn't exist.
220cec6c 3038
7429e2d4 3039- Fixed a bug where ccache deleted Clang diagnostics after compiler failures.
c00db59d 3040
38301c0d
JR
3041- Avoid performing an unnecessary copy of the object file on a cache miss.
3042
8955f497
JR
3043- Bail out on too hard compiler option `-fmodules`.
3044
4f8931b4
JR
3045- Bail out on too hard compiler option `-fplugin=libcc1plugin` (interaction
3046 with GDB).
3047
7429e2d4 3048- Fixed build error when compiling ccache with recent Clang versions.
74f43813 3049
7366fc30
JR
3050- Removed signal-unsafe code from signal handler.
3051
a46807bf
JR
3052- Corrected logic for when to output cached stderr.
3053
3054- Wipe the whole cached result on failure retrieving a cached file.
3055
7429e2d4 3056- Fixed build error when compiling ccache with recent Clang versions.
a46807bf 3057
d2786183 3058
eb9367a7 3059== Ccache 3.2.1
63239e95 3060
a393dcdf
JR
3061Release date: 2014-12-10
3062
3063
63239e95 3064=== Bug fixes
a393dcdf
JR
3065
3066- Fixed regression in temporary file handling, which lead to incorrect
3067 permissions for stats, manifest and ccache.conf files in the cache.
3068
3069- `CACHEDIR.TAG` files are now created in the [0-9a-f] subdirectories so that
3070 ccache.conf is not lost in backups.
3071
3072- Made the default cache size suffix `G`, as previously documented.
3073
3074- `-fdiagnostics-color=auto` is now passed to the compiler even if stderr is
3075 redirected. This fixes a problem when, for instance, a configure test probes
3076 if the compiler (wrapped via ccache) supports `-fdiagnostics-color=auto`.
3077
3078- Added missing documentation for `max_files` and `max_size` configuration
3079 options.
3080
3081
eb9367a7 3082== Ccache 3.2
63239e95 3083
dcda7829 3084Release date: 2014-11-17
1c42ecb9
JR
3085
3086
63239e95 3087=== New features and enhancements
1c42ecb9 3088
77f5636d
JR
3089- Added support for configuring ccache via one or several configuration files
3090 instead of via environment variables. Environment variables still have
3091 priority but are no longer the recommended way of customizing ccache
3092 behavior. See the manual for more information.
3093
dcda7829
JR
3094- Added support for compiler error/warning messages with color.
3095
77f5636d 3096- Made creation of temporary directories and cache directories smarter to avoid
dcda7829 3097 unnecessary `stat` calls.
77f5636d 3098
1819896e 3099- Improved efficiency of the algorithm that scans for `__DATE_` and `+__TIME__+`
dcda7829 3100 tokens in the hashed source code.
77f5636d 3101
dcda7829 3102- Added support for several binaries (separated by space) in `CCACHE_PREFIX`.
77f5636d 3103
dcda7829 3104- The `-c` option is no longer passed to the preprocessor. This fixes problems
63239e95 3105 with Clang and Solaris's C++ compiler.
77f5636d 3106
dcda7829
JR
3107- ccache no longer passes preprocessor options like `-D` and `-I` to the
3108 compiler when compiling preprocessed output. This fixes warnings emitted by
7429e2d4 3109 Clang.
77f5636d 3110
dcda7829
JR
3111- Compiler options `-fprofile-generate`, `-fprofile-arcs`, `-fprofile-use` and
3112 `-fbranch-probabilities` are now handled without bailing.
3113
63239e95 3114- Added support for Clang's `--serialize-diagnostic` option, storing the
dcda7829
JR
3115 diagnostic file (`.dia`) in the cache.
3116
7429e2d4 3117- Added support for precompiled headers when using Clang.
dcda7829 3118
7429e2d4 3119- Added support for Clang `.pth` (pretokenized header) files.
dcda7829
JR
3120
3121- Changed the `-x` language option to use the new objective C standard for GCC
7429e2d4 3122 and Clang.
77f5636d 3123
dcda7829
JR
3124- On a cache miss, ccache now instructs the compiler to create the object file
3125 at the real destination and then copies the file into the cache instead of
3126 the other way around. This is needed to support compiler options like
3127 `-fprofile-arcs` and `--serialize-diagnostics`.
77f5636d 3128
63239e95
JR
3129- ccache now checks that included files' ctimes aren't too new. This check can
3130 be turned off by adding `include_file_ctime` to the "`ccache sloppiness`"
dcda7829 3131 setting.
77f5636d 3132
dcda7829
JR
3133- Added possibility to get cache hits based on filename, size, mtime and ctime
3134 only. On other words, source code files are not even read, only stat-ed. This
63239e95
JR
3135 operation mode is opt-in by adding `file_stat_matches` to the "`ccache
3136 sloppiness`" setting.
dcda7829
JR
3137
3138- The filename part of options like `-Wp,-MDfilename` is no longer included in
63239e95 3139 the hash since the filename doesn't have any bearing on the result.
dcda7829 3140
63239e95 3141- Added a "`read-only direct`" configuration setting, which is like the ordinary
2040286c
JR
3142 read-only setting except that ccache will only try to retrieve results from
3143 the cache using the direct mode, not the preprocessor mode.
dcda7829
JR
3144
3145- The display and interpretation of cache size has been changed to use SI
77f5636d
JR
3146 units.
3147
3148- Default cache size is now 5 GB (was previously 1 GiB).
3149
dcda7829
JR
3150- Added configuration option to set the compression level of compressed object
3151 files in the cache.
3152
3153- Added support for `@file` and `-@file` arguments (reading options from a
3154 file).
77f5636d 3155
63239e95 3156- `-Wl,` options are no longer included in the hash since they don't affect
dcda7829
JR
3157 compilation.
3158
3159- Bail out on too hard compiler option `-Wp,-P`.
3160
3161- Optimized MD4 calculation code on little-endian systems.
3162
3163- Various improvements and fixes on win32.
3164
3165- Improved logging to the ccache log file.
3166
3167- Added `--dump-manifest` command-line option for debugging purposes.
3168
3169- Added `--with-bundled-zlib` configure option.
3170
3171- Upgraded bundled zlib to version 1.2.8.
3172
3173- Improved `dev.mk` to be more platform independent.
3174
7429e2d4 3175- Made the test suite work with Clang and gcc-llvm on OS X.
dcda7829
JR
3176
3177- Various other improvements of the test suite.
1c42ecb9
JR
3178
3179
63239e95 3180=== Bug fixes
1c42ecb9 3181
dcda7829
JR
3182- Any previous `.stderr` is now removed from the cache when recaching.
3183
3184- Fixed an issue when handling the `-arch` compiler option with an argument.
3185
3186- Fixed race condition when creating the initial cache directory.
3187
3188- Fixed test suite failures when `CC` is a ccache-wrapped compiler.
1c42ecb9
JR
3189
3190
eb9367a7 3191== Ccache 3.1.12
63239e95 3192
32b3dcfd 3193Release date: 2016-07-12
49c9f13e
JR
3194
3195
63239e95 3196=== Bug fixes
49c9f13e
JR
3197
3198- Fixed a bug where (due to ccache rewriting paths) the compiler could choose
3199 incorrect include files if `CCACHE_BASEDIR` is used and the source file path
3200 is absolute and is a symlink.
3201
3202
eb9367a7 3203== Ccache 3.1.11
63239e95 3204
27f8ded6
JR
3205Release date: 2015-03-07
3206
d2786183 3207
63239e95 3208=== Bug fixes
d2786183 3209
2f8422af
JR
3210- Fixed bug which could result in false cache hits when source code contains
3211 `'"'` followed by `" /*"` or `" //"` (with variations).
3212
d2786183
JR
3213- Made hash of cached result created with and without `CCACHE_CPP2` different.
3214 This makes it possible to rebuild with `CCACHE_CPP2` set without having to
3215 clear the cache to get new results.
3216
63239e95
JR
3217- Don't try to reset a nonexistent stats file. This avoids "`No such file or
3218 directory`" messages in the ccache log when the cache directory doesn't exist.
3219
6b060798 3220
eb9367a7 3221== Ccache 3.1.10
d2786183 3222
494e8df1 3223Release date: 2014-10-19
c358aa34
JR
3224
3225
63239e95 3226=== New features and enhancements
c358aa34 3227
494e8df1 3228- Added support for the `-Xclang` compiler option.
c358aa34
JR
3229
3230- Improved handling of exit code of internally executed processes.
3231
3232- Zero length object files in the cache are now rejected as invalid.
3233
3234- Bail out on option `-gsplit-dwarf` (since it produces multiple output files).
3235
3236- Compiler option `-fdebug-prefix-map` is now ignored (not part of the hash).
3237 (The `-fdebug-prefix-map` option may be used in combination with
3238 `CCACHE_BASEDIR` to reuse results across different directories.)
3239
3240- Added note in documentation that `--ccache-skip` currently does not mean
63239e95 3241 "`don't hash the following option`".
c358aa34
JR
3242
3243- To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also
3244 needs to include the new `pch_defines` sloppiness. This is because ccache
63239e95 3245 can't detect changes in the source code when only defined macros have been
c358aa34
JR
3246 changed.
3247
3248- Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now
3249 cleaned up if they are older than one hour.
3250
3251
63239e95 3252=== Bug fixes
c358aa34 3253
63239e95 3254- Fixed path canonicalization in `make_relative_path()` when path doesn't
c358aa34
JR
3255 exist.
3256
494e8df1
JR
3257- Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR`
3258 behavior.
c358aa34
JR
3259
3260- ccache no longer tries to create the cache directory when `CCACHE_DISABLE` is
3261 set.
3262
3263- Fixed bug when reading manifests with a very large number of file info
3264 entries.
3265
3266- Fixed problem with logging of current working directory.
3267
3268
eb9367a7 3269== Ccache 3.1.9
63239e95 3270
326bcbfd
JR
3271Release date: 2013-01-06
3272
3273
63239e95 3274=== Bug fixes
326bcbfd 3275
fa6de61e
JR
3276- The EAGAIN signal is now handled correctly when emitting cached stderr
3277 output. This fixes a problem triggered by large error outputs from the
3278 compiler.
3279
3280- Subdirectories in the cache are no longer created in read-only mode.
3281
63239e95 3282- Fixed so that ccache's log file descriptor is not made available to the
fa6de61e
JR
3283 compiler.
3284
3285- Improved error reporting when failing to create temporary stdout/stderr files
3286 when executing the compiler.
3287
3288- Disappearing temporary stdout/stderr files are now handled gracefully.
326bcbfd
JR
3289
3290
63239e95 3291=== Other
326bcbfd 3292
fa6de61e 3293- Fixed test suite to work on ecryptfs.
326bcbfd
JR
3294
3295
eb9367a7 3296== Ccache 3.1.8
63239e95 3297
6059c7e3
JR
3298Release date: 2012-08-11
3299
3300
63239e95 3301=== New features and enhancements
6059c7e3 3302
fa6de61e
JR
3303- Made paths to dependency files relative in order to increase cache hits.
3304
3305- Added work-around to make ccache work with buggy GCC 4.1 when creating a
3306 pre-compiled header.
3307
3308- Clang plugins are now hashed to catch plugin upgrades.
6059c7e3
JR
3309
3310
63239e95 3311=== Bug fixes
6059c7e3 3312
fa6de61e
JR
3313- Fixed crash when the current working directory has been removed.
3314
3315- Fixed crash when stderr is closed.
3316
3317- Corrected a corner case when parsing backslash escapes in string
3318 literals.
3319
3320- Paths are now correctly canonicalized when computing paths relative to the
3321 base directory.
6059c7e3
JR
3322
3323
63239e95 3324=== Other
6059c7e3 3325
fa6de61e
JR
3326- Made git version macro work when compiling outside of the source directory.
3327
3328- Fixed `static_assert` macro definition clash with GCC 4.7.
6059c7e3
JR
3329
3330
eb9367a7 3331== Ccache 3.1.7
63239e95 3332
cb09292b
JR
3333Release date: 2012-01-08
3334
3335
63239e95 3336=== Bug fixes
cb09292b 3337
fa6de61e
JR
3338- Non-writable `CCACHE_DIR` is now handled gracefully when `CCACHE_READONLY` is
3339 set.
3340
3341- Made failure to create files (typically due to bad directory permissions) in
3342 the cache directory fatal. Previously, such failures were silently and
63239e95 3343 erroneously flagged as "`compiler produced stdout`".
fa6de61e
JR
3344
3345- Both the `-specs=file` and `--specs=file` forms are now recognized.
3346
3347- Added recognition and hashing of GCC plugins specified with `-fplugin=file`.
3348
3349- `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs files
3350 (`-specs=file`).
3351
3352- Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the hash
3353 to avoid false cache hits when such variables have changed.
3354
3355- Corrected log message when unify mode is enabled.
3356
3357- Reverted the GCC bug compatibility introduced in ccache 3.1.5 for `-MT`/`-MQ`
3358 options with concatenated arguments. (The bug is fixed in recent GCC
3359 versions.)
cb09292b
JR
3360
3361
63239e95 3362=== Other
cb09292b 3363
fa6de61e
JR
3364- Corrected license header for `mdfour.c`.
3365
3366- Improved documentation on how to fix bad object files in the cache.
cb09292b
JR
3367
3368
3369
eb9367a7 3370== Ccache 3.1.6
63239e95 3371
eea38147
JR
3372Release date: 2011-08-21
3373
3374
63239e95 3375=== New features and enhancements
eea38147 3376
fa6de61e 3377- Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used.
eea38147
JR
3378
3379
63239e95 3380=== Bug fixes
eea38147 3381
63239e95 3382- Don't crash if `getcwd()` fails.
fa6de61e 3383
63239e95 3384- Fixed alignment of "`called for preprocessing`" counter.
eea38147
JR
3385
3386
eb9367a7 3387== Ccache 3.1.5
63239e95 3388
3e6d8e25
JR
3389Release date: 2011-05-29
3390
3391
63239e95 3392=== New features and enhancements
3e6d8e25 3393
63239e95 3394- Added a new statistics counter named "`called for preprocessing`".
fa6de61e
JR
3395
3396- The original command line is now logged to the file specified with
3397 `CCACHE_LOGFILE`.
3398
3399- Improved error logging when system calls fail.
3400
3401- Added support for rewriting absolute paths in `-F`/`-iframework` GCC
3402 options.
3403
3404- Improved order of statistics counters in `ccache -s` output.
3e6d8e25
JR
3405
3406
63239e95 3407=== Bug fixes
3e6d8e25 3408
fa6de61e
JR
3409- The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled
3410 correctly when they are last on the command line.
3411
3412- ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with
3413 concatenated arguments.
3414
3415- Fixed a minor memory leak.
3416
63239e95
JR
3417- Systems that lack (and don't need to be linked with) libm are now supported.
3418
3e6d8e25 3419
eb9367a7 3420== Ccache 3.1.4
3e6d8e25 3421
32ea6b09
JR
3422Release date: 2011-01-09
3423
3424
63239e95 3425=== Bug fixes
32ea6b09 3426
c358aa34 3427- Made a work-around for a bug in `gzputc()` in zlib 1.2.5.
32ea6b09 3428
63239e95 3429- Corrupt manifest files are now removed so that they won't block direct mode
fa6de61e 3430 hits.
32ea6b09 3431
63239e95 3432- ccache now copes with file systems that don't know about symbolic links.
32ea6b09 3433
0468a9d2 3434- The file handle is now correctly closed on write error when trying to create
fa6de61e 3435 a cache dir tag.
32ea6b09
JR
3436
3437
eb9367a7 3438== Ccache 3.1.3
63239e95 3439
d2b03fc9
JR
3440Release date: 2010-11-28
3441
3442
63239e95 3443=== Bug fixes
d2b03fc9 3444
fa6de61e
JR
3445- The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between
3446 option and argument) are now handled correctly.
d2b03fc9
JR
3447
3448
63239e95 3449=== Other
d2b03fc9 3450
39586a81 3451- Portability fixes for HP-UX 11.00 and other less common systems.
d2b03fc9
JR
3452
3453
eb9367a7 3454== Ccache 3.1.2
63239e95 3455
69406462
JR
3456Release date: 2010-11-21
3457
3458
63239e95 3459=== Bug fixes
69406462 3460
fa6de61e 3461- Bail out on too hard compiler options `-fdump-*`.
69406462 3462
fa6de61e
JR
3463- NULL return values from malloc/calloc of zero bytes are now handled
3464 correctly.
69406462 3465
fa6de61e 3466- Fixed issue when parsing precompiler output on AIX.
69406462
JR
3467
3468
63239e95 3469=== Other
69406462 3470
fa6de61e 3471- Improved documentation on which information is included in the hash sum.
69406462 3472
63239e95 3473- Made the "`too new header file`" test case work on file systems with
fa6de61e 3474 unsynchronized clocks.
69406462 3475
fa6de61e 3476- The test suite now also works on systems that lack a /dev/zero.
69406462
JR
3477
3478
eb9367a7 3479== Ccache 3.1.1
63239e95 3480
6ba799b8
JR
3481Release date: 2010-11-07
3482
3483
63239e95 3484=== Bug fixes
6ba799b8 3485
fa6de61e
JR
3486- ccache now falls back to preprocessor mode when a non-regular include file
3487 (device, socket, etc) has been detected so that potential hanging due to
3488 blocking reads is avoided.
6ba799b8 3489
fa6de61e 3490- CRC errors are now detected when decompressing compressed files in the cache.
6ba799b8 3491
fa6de61e 3492- Fixed potential object file corruption race on NFS.
6ba799b8 3493
fa6de61e 3494- Minor documentation corrections.
6ba799b8 3495
fa6de61e 3496- Fixed configure detection of ar.
6ba799b8 3497
fa6de61e 3498- ccache development version (set by dev.mk) now works with gits whose
63239e95 3499 `describe` command doesn't understand `--dirty`.
6ba799b8
JR
3500
3501
63239e95 3502=== Other
6ba799b8 3503
fa6de61e 3504- Minor debug log message improvements.
6ba799b8
JR
3505
3506
eb9367a7 3507== Ccache 3.1
63239e95 3508
588214d6 3509Release date: 2010-09-16
c6a1740b 3510
fa6de61e 3511
63239e95 3512=== New features and enhancements
c6a1740b 3513
fa6de61e
JR
3514- Added support for hashing the output of a custom command (e.g. `%compiler%
3515 --version`) to identify the compiler instead of stat-ing or hashing the
3516 compiler binary. This can improve robustness when the compiler (as seen by
63239e95 3517 ccache) actually isn't the real compiler but another compiler wrapper.
a97801ce 3518
fa6de61e
JR
3519- Added support for caching compilations that use precompiled headers. (See the
3520 manual for important instructions regarding this.)
a97801ce 3521
fa6de61e
JR
3522- Locking of the files containing statistics counters is now done using
3523 symlinks instead of POSIX locks. This should make ccache behave a lot better
3524 on file systems where POSIX locks are slow or broken (e.g. NFS on some
3525 systems).
a97801ce 3526
fa6de61e 3527- Manifest files are now updated without the need of taking locks.
a97801ce 3528
fa6de61e
JR
3529- Updates of statistics counters are now always done in one of the sub-level
3530 statistics files. This reduces lock contention, which especially improves
3531 performance on slow NFS mounts.
a97801ce 3532
fa6de61e
JR
3533- Reading and writing of statistics counters has been made forward-compatible
3534 (unknown counters are retained).
a97801ce 3535
63239e95 3536- Files are now read without using `mmap()`. This has two benefits: it's more
fa6de61e 3537 robust against file changes during reading and it improves performance on
63239e95 3538 poor systems where `mmap()` doesn't use the disk cache.
a97801ce 3539
fa6de61e 3540- Added `.cp` and `.CP` as known C++ suffixes.
a97801ce 3541
fa6de61e 3542- Improved logging.
a97801ce 3543
fa6de61e
JR
3544- Added `-install_name` as an option known to take an argument. (This improves
3545 statistics when using the Darwin linker.)
c6a1740b
JR
3546
3547
63239e95 3548=== Bug fixes
c6a1740b 3549
fa6de61e 3550- Non-fatal error messages are now never printed to stderr but logged instead.
a97801ce 3551
fa6de61e 3552- Fixed a bug affecting failing commands when `--ccache-skip` is used.
c6a1740b 3553
fa6de61e 3554- Made `--ccache-skip` work for all options.
8177355f 3555
fa6de61e 3556- EINTR is now handled correctly.
c70a582e 3557
c6a1740b 3558
63239e95 3559=== Other
c6a1740b 3560
fa6de61e
JR
3561- Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The
3562 port is not yet finished, but will hopefully be complete in some subsequent
3563 release.
a97801ce 3564
fa6de61e 3565- Added a `--nostats` flag to the performance benchmark program.
a97801ce 3566
fa6de61e
JR
3567- Made the performance benchmark program more accurate when measuring cache
3568 hits.
a97801ce 3569
fa6de61e 3570- Added a new test framework for unit tests written in C.
a97801ce 3571
fa6de61e 3572- Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` presence.
a97801ce 3573
fa6de61e
JR
3574- Improved documentation on how to combine ccache with other compiler wrappers
3575 (like `distcc`).
a97801ce 3576
fa6de61e
JR
3577- New `LICENSE.txt` file with licensing and copyright details about bundled
3578 source code.
a97801ce 3579
fa6de61e 3580- New `AUTHORS.txt` file with a list of ccache contributors.
a97801ce 3581
fa6de61e 3582- New `HACKING.txt` file with some notes about ccache code conventions.
c6a1740b
JR
3583
3584
eb9367a7 3585== Ccache 3.0.1
63239e95 3586
bcc22fb4 3587Release date: 2010-07-15
36bb1666 3588
fa6de61e 3589
63239e95 3590=== Bug fixes
36bb1666 3591
63239e95 3592- The statistics counter "`called for link`" is now correctly updated when
fa6de61e
JR
3593 linking with a single object file.
3594
3595- Fixed a problem with out-of-source builds.
36bb1666
JR
3596
3597
eb9367a7 3598== Ccache 3.0
63239e95 3599
bcc22fb4 3600Release date: 2010-06-20
712a416d 3601
fa6de61e 3602
712a416d
JR
3603General
3604~~~~~~~
3605
fa6de61e
JR
3606- ccache is now licensed under the GNU General Public License (GPL) version 3
3607 or later.
712a416d
JR
3608
3609
63239e95 3610=== Upgrade notes
d3040209 3611
63239e95 3612- The way the hashes are calculated has changed, so you won't get cache hits
fa6de61e
JR
3613 for compilation results stored by older ccache versions. Because of this, you
3614 might as well clear the old cache directory with `ccache --clear` if you
3615 want, unless you plan to keep using an older ccache version.
712a416d 3616
d3040209 3617
63239e95 3618=== New features and enhancements
d3040209 3619
63239e95 3620- ccache now has a "`direct mode`" where it computes a hash of the source code
fa6de61e
JR
3621 (including all included files) and compiler options without running the
3622 preprocessor. By not running the preprocessor, CPU usage is reduced; the
3623 speed is somewhere between 1 and 5 times that of ccache running in
3624 traditional mode, depending on the circumstances. The speedup will be higher
3625 when I/O is fast (e.g., when files are in the disk cache). The direct mode
3626 can be disabled by setting +CCACHE_NODIRECT+.
71f0bb11 3627
fa6de61e
JR
3628- Support has been added for rewriting absolute paths to relative paths when
3629 hashing, in order to increase cache hit rate when building the same source
3630 code in different directories even when compiling with `-g` and when using
3631 absolute include directory paths. This is done by setting the
3632 `CCACHE_BASEDIR` environment variable to an absolute path that specifies
3633 which paths to rewrite.
71f0bb11 3634
fa6de61e
JR
3635- Object files are now optionally stored compressed in the cache. The runtime
3636 cost is negligible, and more files will fit in the ccache directory and in
3637 the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note
63239e95 3638 that you can't use compression in combination with the hard link feature.
37739bc9 3639
fa6de61e
JR
3640- A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what
3641 compiler-identifying information to hash to ensure that results retrieved
63239e95
JR
3642 from the cache are accurate. Possible values are: none (don't hash anything),
3643 mtime (hash the compiler's mtime and size) and content (hash the content of
fa6de61e 3644 the compiler binary). The default is mtime.
3ebcc3b8 3645
fa6de61e
JR
3646- It is now possible to specify extra files whose contents should be included
3647 in the hash sum by setting the `CCACHE_EXTRAFILES` option.
609fb341 3648
fa6de61e 3649- Added support for Objective-C and Objective-C\+\+. The statistics counter
63239e95 3650 "`not a C/C++ file`" has been renamed to "`unsupported source language`".
ad4e1ea2 3651
fa6de61e 3652- Added support for the `-x` compiler option.
68e04674 3653
fa6de61e 3654- Added support for long command-line options.
59eb6b9f 3655
fa6de61e
JR
3656- A `CACHEDIR.TAG` file is now created in the cache directory. See
3657 <http://www.brynosaurus.com/cachedir/>.
131111cd 3658
fa6de61e
JR
3659- Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have been
3660 improved.
24f886c4 3661
fa6de61e
JR
3662- You can relax some checks that ccache does in direct mode by setting
3663 `CCACHE_SLOPPINESS`. See the manual for more information.
eb5d9bd3 3664
fa6de61e
JR
3665- `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as
3666 `CCACHE_DIR`.
14865889 3667
fa6de61e
JR
3668- The default value of `CCACHE_TEMPDIR` has been changed to `$CCACHE_DIR/tmp`
3669 to avoid cluttering the top directory.
14865889 3670
fa6de61e
JR
3671- Temporary files that later will be moved into the cache are now created in
3672 the cache directory they will end up in. This makes ccache more friendly to
63239e95 3673 Linux's directory layout.
ce0dece1 3674
fa6de61e 3675- Improved the test suite and added tests for most of the new functionality.
63239e95 3676 It's now also possible to specify a subset of tests to run.
2b2f5ddc 3677
fa6de61e 3678- Standard error output from the compiler is now only stored in the cache if
63239e95 3679 it's non-empty.
d3040209 3680
fa6de61e
JR
3681- If the compiler produces no object file or an empty object file, but gives a
3682 zero exit status (could be due to a file system problem, a buggy program
3683 specified by `CCACHE_PREFIX`, etc.), ccache copes with it properly.
d3040209 3684
fa6de61e 3685- Added `installcheck` and `distcheck` make targets.
d3040209 3686
63239e95 3687- Clarified cache size limit options' and cleanup semantics.
71f0bb11 3688
fa6de61e 3689- Improved display of cache max size values.
71f0bb11 3690
fa6de61e
JR
3691- The following options are no longer hashed in the preprocessor mode:
3692 `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, `-iwithprefix`,
3693 `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and `-U`.
1b322f5f 3694
712a416d 3695
63239e95 3696=== Bug fixes
3e9dda00 3697
fa6de61e 3698- Various portability improvements.
71f0bb11 3699
fa6de61e 3700- Improved detection of home directory.
3e9dda00 3701
fa6de61e 3702- User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile.
71f0bb11 3703
fa6de61e 3704- Fixed NFS issues.
71f0bb11 3705
fa6de61e
JR
3706- Computation of the hash sum has been improved to decrease the risk of hash
3707 collisions. For instance, the compiler options `-X -Y` and `-X-Y` previously
3708 contributed equally to the hash sum.
11a8b143 3709
fa6de61e
JR
3710- Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`,
3711 `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and
3712 `-save-temps`. Also bail out on `@file` style options.
a83c52e1 3713
fa6de61e 3714- Errors when using multiple `-arch` compiler options are now noted as
63239e95 3715 "`unsupported compiler option`".
71f0bb11 3716
fa6de61e 3717- `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly.
71f0bb11 3718
fa6de61e 3719- The `-finput-charset` option is now handled correctly.
b0f0af5a 3720
fa6de61e 3721- Added support for `-Wp,-MD` and `-Wp,-MMD` options.
e289678f 3722
fa6de61e
JR
3723- The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly
3724 recognized as taking an argument.
b964c173 3725
fa6de61e
JR
3726- Debug information containing line numbers of predefined and command-line
3727 macros (enabled with the compiler option `-g3`) will now be correct.
574ab5a9 3728
fa6de61e 3729- Corrected LRU cleanup handling of object files.
b80dfc47 3730
fa6de61e 3731- `utimes()` is now used instead of `utime()` when available.
4b8883c5 3732
fa6de61e 3733- Non-writable cache directories are now handled gracefully.
7f341480 3734
fa6de61e 3735- Corrected documentation about sharing the cache directory.
b8ad2040 3736
fa6de61e 3737- Fixed compilation warnings from GCC 4.3.
7f341480 3738
fa6de61e 3739- The command specified by `CCACHE_PREFIX` is no longer part of the hash.
7f341480 3740
fa6de61e 3741- Fixed bad memory access spotted by Valgrind.
b8ad2040 3742
fa6de61e 3743- Fixed a bug in `x_realloc`.
5ea294ef 3744
fa6de61e
JR
3745- Freed memory is no longer referenced when compiling a `.i`/`.ii` file and
3746 falling back to running the real compiler.
56ef07fd 3747
fa6de61e
JR
3748- The test suite is now immune to external values of the `CCACHE_*` environment
3749 variables.
1a56b7d2 3750
fa6de61e 3751- Improved detection of recursive invocation.
ad4e1ea2 3752
fa6de61e 3753- The ccache binary is now not unconditionally stripped when installing.
ad4e1ea2 3754
fa6de61e
JR
3755- Statistics counters are now correctly updated for -E option failures and
3756 internal errors.