]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Mon, 14 Oct 2019 16:56:50 +0000 (18:56 +0200)]
Add missing #pragma once to File.hpp
Joel Rosdahl [Sun, 13 Oct 2019 19:58:31 +0000 (21:58 +0200)]
Add -MQ to compilation flags to make dependency files work properly
Looks like ccache’s own header dependencies have been broken since
4aa357782e48 and nobody noticed.
(cherry picked from commit
a00b59c86136488d54a83bef10bc5a0f6b37eacf )
totph [Mon, 14 Oct 2019 18:28:19 +0000 (20:28 +0200)]
Fix an out-of-bounds read when logging (#475)
The stack variable `suffix` is not guaranteed to be zero-terminated.
Joel Rosdahl [Tue, 8 Oct 2019 19:58:07 +0000 (21:58 +0200)]
Recompress in parallel
Recompression is now done by a thread pool with one thread per logical
CPU. There is also a read-ahead to let the main thread do some directory
I/O while the CPUs are busy.
Joel Rosdahl [Sun, 6 Oct 2019 21:08:00 +0000 (23:08 +0200)]
Add -X/--recompress option
Joel Rosdahl [Sun, 6 Oct 2019 20:21:46 +0000 (22:21 +0200)]
Let cache entry writer/reader update/verify checksums
Joel Rosdahl [Sun, 6 Oct 2019 19:43:39 +0000 (21:43 +0200)]
Make File movable and noncopyable
Joel Rosdahl [Sun, 6 Oct 2019 14:05:20 +0000 (16:05 +0200)]
Rename file_size to file_size_on_disk and improve its return type
Joel Rosdahl [Wed, 2 Oct 2019 12:24:19 +0000 (14:24 +0200)]
Refactor result/manifest reading/writing
* Converted compression code into C++ interfaces and implementations.
* Extracted code for reading/writing results/manifests into
reader/writer classes.
* C++-ified result/manifest parsing code.
Joel Rosdahl [Mon, 30 Sep 2019 19:28:20 +0000 (21:28 +0200)]
Add unit test of AtomicFile
Joel Rosdahl [Mon, 30 Sep 2019 19:28:12 +0000 (21:28 +0200)]
Add AtomicFile::stream
Joel Rosdahl [Mon, 30 Sep 2019 18:37:03 +0000 (20:37 +0200)]
Rename AtomicFile::close to commit
This better conveys the semantics.
Joel Rosdahl [Mon, 30 Sep 2019 18:34:56 +0000 (20:34 +0200)]
Include .tmp. in AtomicFile names
This makes it possible to use AtomicFile for files in the cache
directory without having to add a “.tmp” interfix explicitly.
Joel Rosdahl [Sun, 29 Sep 2019 13:07:55 +0000 (15:07 +0200)]
Add Util::big_endian_to_int and Util::int_to_big_endian
Joel Rosdahl [Sun, 29 Sep 2019 13:07:24 +0000 (15:07 +0200)]
Add Util::get_file_size
Joel Rosdahl [Thu, 26 Sep 2019 17:53:41 +0000 (19:53 +0200)]
Add std::make_unique implementation
Joel Rosdahl [Wed, 25 Sep 2019 18:33:15 +0000 (20:33 +0200)]
Use UpperCamelCase instead of snake_case for namespaces
This makes Foo::bar work for both a namespace Foo and a class Foo.
Joel Rosdahl [Tue, 24 Sep 2019 19:50:27 +0000 (21:50 +0200)]
Make AtomicFile::Type values lower case
Joel Rosdahl [Mon, 23 Sep 2019 20:36:37 +0000 (22:36 +0200)]
Extract temporary file creation code into a function
Also, use cstdio instead of iostream since that will be needed in
upcoming commits to get hold on the underlying file descriptor.
Joel Rosdahl [Wed, 18 Sep 2019 19:17:47 +0000 (21:17 +0200)]
Add and use Checksum class
The class wraps an XXH64 state.
Joel Rosdahl [Sun, 8 Sep 2019 17:29:12 +0000 (19:29 +0200)]
Add and use CacheFile::Type and CacheFile::type
Joel Rosdahl [Sat, 7 Sep 2019 17:55:38 +0000 (19:55 +0200)]
Move parse_int to util
Joel Rosdahl [Sat, 5 Oct 2019 18:21:08 +0000 (20:21 +0200)]
Fix test suite problems on OS X
As suggested in PR #469.
Co-authored-by: Enrico Sorichetti <enricosorichetti@mac.com>
Joel Rosdahl [Sat, 5 Oct 2019 18:17:03 +0000 (20:17 +0200)]
Force regeneration of autotools stuff in autogen.sh
As suggested in PR #469.
Co-authored-by: Enrico Sorichetti <enricosorichetti@mac.com>
Joel Rosdahl [Sat, 5 Oct 2019 18:16:21 +0000 (20:16 +0200)]
Add .DS_Store to .gitignore
As suggested in PR #469.
Co-authored-by: Enrico Sorichetti <enricosorichetti@mac.com>
Joel Rosdahl [Sat, 5 Oct 2019 18:13:59 +0000 (20:13 +0200)]
Make detection of supported Clang warning flags actually work
As suggested in PR #469.
Co-authored-by: Enrico Sorichetti <enricosorichetti@mac.com>
Joel Rosdahl [Thu, 3 Oct 2019 18:40:06 +0000 (20:40 +0200)]
Add support for -MF=arg as understood by EDG-based compilers
Closes #460.
(cherry picked from commit
d5ff95277932936ed6b3dc1b674562a8682f8aef )
Joel Rosdahl [Thu, 3 Oct 2019 18:21:54 +0000 (20:21 +0200)]
Only pass implicit -MQ to preprocessor if needed
This is a bug fix of
76a9959f3d3e .
(cherry picked from commit
19c3729d30640fc2c78242cb46136e619fdbd802 )
Joel Rosdahl [Thu, 3 Oct 2019 18:15:52 +0000 (20:15 +0200)]
Update NEWS
(cherry picked from commit
3c0e894c58b887bc40e2be99e722bd9b68df8689 )
Breno Guimaraes [Sat, 21 Sep 2019 21:27:52 +0000 (17:27 -0400)]
Simplify code
Breno Guimaraes [Sat, 14 Sep 2019 00:23:37 +0000 (20:23 -0400)]
Extract function for free+nullify pattern
Breno Guimaraes [Sat, 21 Sep 2019 19:26:08 +0000 (15:26 -0400)]
Dont free/null variable twice
Joel Rosdahl [Sun, 22 Sep 2019 17:46:42 +0000 (19:46 +0200)]
Don’t crash if localtime returns null pointer in localtime_r replacement
This seems to happen in some unknown Windows environment, see #450.
Fixes #450.
(cherry picked from commit
8c4ffbab96a8f4bebc27b39ad3a235a5d8baeab3 )
Joel Rosdahl [Tue, 17 Sep 2019 20:37:57 +0000 (22:37 +0200)]
Include compiler-only arguments in the hash
After
5d8585b5 (#312), arguments that are not considered affecting the
preprocessor output won’t be passed to the preprocessor. -Werror and
-Wno-error are also not passed to the preprocessor so that options not
properly marked as “compiler only” will only trigger warnings, not
errors. This was a workaround for Clang complaining about unused
arguments in the preprocessor step performed by ccache.
However, it also introduced a regression: -Werror and the other options
were excluded from the hash as well. This means that
cc -c file_with_warnings.c
would be cached by ccache, including the warning message. A later
cc -Werror -c file_with_warnings.c
call would then be a cache hit, resulting in a compilation warning
instead of an error.
This commit fixes the problem by also including the compiler-only
arguments in the hash.
(cherry picked from commit
6be00a0070d3898fe7201f6db44a9a3c42627bf8 )
Joel Rosdahl [Sun, 15 Sep 2019 20:36:18 +0000 (22:36 +0200)]
Add configure check for Clang flags for disabling warnings
As suggested in #466.
Also, make --enable-more-warnings actually work when building from a
release archive.
Joel Rosdahl [Sun, 15 Sep 2019 20:31:25 +0000 (22:31 +0200)]
Move dev mode configure check to the top
This makes it possible to make decisions depending on dev mode futher
down in configure.
Joel Rosdahl [Sun, 15 Sep 2019 20:30:54 +0000 (22:30 +0200)]
Add configure macro AX_CHECK_COMPILE_FLAG
Joel Rosdahl [Sun, 15 Sep 2019 20:30:34 +0000 (22:30 +0200)]
Remove obsolete configure check related to snprintf replacements
Joel Rosdahl [Thu, 12 Sep 2019 20:07:01 +0000 (22:07 +0200)]
Clarify 3.7.4 news items
-gz is apparently supported by GCC 5+ and Clang as well.
Joel Rosdahl [Thu, 12 Sep 2019 19:14:09 +0000 (21:14 +0200)]
Prepare for v3.7.4
(cherry picked from commit
fbdb291fbf0fc749ed44fc510ff023c8030359ff )
Joel Rosdahl [Thu, 12 Sep 2019 19:14:06 +0000 (21:14 +0200)]
Update NEWS
(cherry picked from commit
d5697e4bcb04cf78245e30fbebdc4536d66c290a )
Joel Rosdahl [Thu, 12 Sep 2019 18:50:46 +0000 (20:50 +0200)]
Support GCC 9’s -gz=[type] option
-gz[=type] neither disables nor enables generation of debug info, so
don’t enable the fallback behavior of hashing the current directory when
seeing -gz[=type] alone.
Closes #464.
(cherry picked from commit
cb7a05a772ce3dcec58da16d957420f36cb97f75 )
Joel Rosdahl [Sat, 7 Sep 2019 17:45:10 +0000 (19:45 +0200)]
Update NEWS
Joel Rosdahl [Sat, 7 Sep 2019 17:41:00 +0000 (19:41 +0200)]
Add missing include guard
Joel Rosdahl [Fri, 6 Sep 2019 18:01:28 +0000 (20:01 +0200)]
Sort function definitions
Joel Rosdahl [Thu, 5 Sep 2019 20:02:01 +0000 (22:02 +0200)]
Set sysconfdir to /etc when dist checking
This makes the command line stable so that we can get ccache hits.
Joel Rosdahl [Thu, 5 Sep 2019 20:01:14 +0000 (22:01 +0200)]
Don’t fail on error when dist checking
libb2 can’t be built with -Werror.
Joel Rosdahl [Thu, 5 Sep 2019 20:00:41 +0000 (22:00 +0200)]
Merge dist checks for using libzstd/libb2 from the Internet
Joel Rosdahl [Thu, 5 Sep 2019 19:54:58 +0000 (21:54 +0200)]
Sort .gitignore
Joel Rosdahl [Thu, 5 Sep 2019 19:53:58 +0000 (21:53 +0200)]
Don’t error out if a libzstd/libb2 Makefile doesn’t exist when cleaning
Joel Rosdahl [Thu, 5 Sep 2019 19:39:40 +0000 (21:39 +0200)]
Add missing fmt headers to dist archive
Joel Rosdahl [Wed, 4 Sep 2019 19:11:04 +0000 (21:11 +0200)]
Add progress bar for -x/--show-compression
Joel Rosdahl [Wed, 4 Sep 2019 18:02:04 +0000 (20:02 +0200)]
Add progress bar for -c/--cleanup and -C/--clear
Joel Rosdahl [Wed, 4 Sep 2019 17:53:12 +0000 (19:53 +0200)]
Constify file_size
Joel Rosdahl [Wed, 28 Aug 2019 20:44:13 +0000 (22:44 +0200)]
Add util::for_each_level_1_subdir function
Joel Rosdahl [Wed, 28 Aug 2019 20:41:23 +0000 (22:41 +0200)]
Add util::get_level_1_files function
Joel Rosdahl [Wed, 28 Aug 2019 19:58:06 +0000 (21:58 +0200)]
Add ProgressBar class
The progress bar draws a simple progress bar with percentage to the
console.
Joel Rosdahl [Sun, 25 Aug 2019 20:17:22 +0000 (22:17 +0200)]
Add util::ends_with
Joel Rosdahl [Sun, 25 Aug 2019 11:52:43 +0000 (13:52 +0200)]
Fix include so that Cppcheck finds it
Joel Rosdahl [Sun, 25 Aug 2019 09:34:06 +0000 (11:34 +0200)]
Remove no longer matched Cppcheck suppression
Joel Rosdahl [Sun, 25 Aug 2019 09:29:17 +0000 (11:29 +0200)]
Fix Cppcheck warning about always false value
Joel Rosdahl [Sun, 25 Aug 2019 09:28:54 +0000 (11:28 +0200)]
Make legacy_suites a constant
Joel Rosdahl [Sun, 25 Aug 2019 09:24:57 +0000 (11:24 +0200)]
Remove left-over statement
Joel Rosdahl [Sun, 25 Aug 2019 08:49:00 +0000 (10:49 +0200)]
Add util::create_dir, replacing create_parent_dirs and create_dir
Joel Rosdahl [Sat, 24 Aug 2019 20:34:23 +0000 (22:34 +0200)]
Improve documentation of util::read_file/write_file
Joel Rosdahl [Sat, 24 Aug 2019 20:18:33 +0000 (22:18 +0200)]
Add util::dir_name
Joel Rosdahl [Sat, 24 Aug 2019 20:17:51 +0000 (22:17 +0200)]
Add util::base_name
Joel Rosdahl [Sat, 24 Aug 2019 12:49:16 +0000 (14:49 +0200)]
Extract Catch2 main to a separate object file
This way the Catch2 object file (which takes a long time to compile)
won’t be invalidated each time ccache.hpp is updated.
Joel Rosdahl [Sat, 24 Aug 2019 12:31:51 +0000 (14:31 +0200)]
C++-ify create_cachedir_tag
Joel Rosdahl [Sat, 24 Aug 2019 12:30:16 +0000 (14:30 +0200)]
Don’t fail if CACHEDIR.TAG can’t be created
Logging is enough.
Joel Rosdahl [Fri, 23 Aug 2019 17:46:40 +0000 (19:46 +0200)]
Replace third party hashtable with std::unordered_map
Joel Rosdahl [Thu, 29 Aug 2019 19:32:47 +0000 (21:32 +0200)]
Fix code style
Harsh Shandilya [Thu, 5 Sep 2019 19:38:43 +0000 (01:08 +0530)]
Ignore archives and directories for libb2 and libzstd (#459)
These are not required to be tracked under VCS.
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Harsh Shandilya [Thu, 5 Sep 2019 19:05:10 +0000 (00:35 +0530)]
configure: Update libzstd to 1.4.3 (#458)
Confirmed that all tests pass on Linux x86_64.
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Cristian Adam [Wed, 28 Aug 2019 17:07:21 +0000 (19:07 +0200)]
Win32: make_relative_path also accept /c/users (#455)
Patch copied from jd-gascuel@
f3b85c9
Joel Rosdahl [Sat, 17 Aug 2019 21:29:14 +0000 (23:29 +0200)]
doc: Add references to configuration items
Joel Rosdahl [Sat, 17 Aug 2019 21:08:32 +0000 (23:08 +0200)]
doc: Add anchors to configuration items
Joel Rosdahl [Sat, 17 Aug 2019 21:02:01 +0000 (23:02 +0200)]
doc: Mention that XXH64 is used for checksumming
Joel Rosdahl [Sat, 17 Aug 2019 21:00:55 +0000 (23:00 +0200)]
doc: Remove note about hard links caveats from feature summary
I feel that the warning doesn’t quite belong to that list.
Joel Rosdahl [Sat, 17 Aug 2019 20:07:43 +0000 (22:07 +0200)]
Prepare for v3.7.3
(cherry picked from commit
fc69e8243743a2ed9305ff58c00e4fb23cb55237 )
Joel Rosdahl [Sat, 17 Aug 2019 19:59:15 +0000 (21:59 +0200)]
Update NEWS
Joel Rosdahl [Sat, 17 Aug 2019 11:04:06 +0000 (13:04 +0200)]
Add missing include guard
Joel Rosdahl [Fri, 16 Aug 2019 17:27:20 +0000 (19:27 +0200)]
Fix typo in NEWS
(cherry picked from commit
8c0a53c00f7d1d06aa4837d77f1dff23ae7c1150 )
Joel Rosdahl [Thu, 15 Aug 2019 20:20:38 +0000 (22:20 +0200)]
Don’t pass -Wno-error to the preprocessor
This is done to keep the argument order between -Werror and -Wno-error.
Fixes #451.
(cherry picked from commit
70986342c8948ac2ae974ee98efbcd6865003dc1 )
Joel Rosdahl [Thu, 15 Aug 2019 19:39:06 +0000 (21:39 +0200)]
Update news with a high-level summary of changes in 4.0 so far
Joel Rosdahl [Thu, 15 Aug 2019 18:49:53 +0000 (20:49 +0200)]
Use std::min/std::max instead of MIN/MAX macros
Joel Rosdahl [Thu, 15 Aug 2019 18:41:14 +0000 (20:41 +0200)]
Bump to CUDA 10.1.243 for Ubuntu 16.04
Joel Rosdahl [Thu, 15 Aug 2019 18:38:52 +0000 (20:38 +0200)]
Fix “(readonly)” part of “ccache -s”
It was just a mistake in
800f8ed2edca0 .
Joel Rosdahl [Wed, 14 Aug 2019 19:58:19 +0000 (21:58 +0200)]
C++-ify configuration handling
- Instead of using code generated by gperf, use ordinary unordered maps
for the mapping from config keys (and environment variables) to config
items.
- Renamed “struct conf* conf” to “class Config g_config”.
- C++-ified conf.cpp and confitems.cpp into Config.cpp.
Joel Rosdahl [Sun, 11 Aug 2019 17:54:33 +0000 (19:54 +0200)]
Clean up header includes
* All headers should have system.hpp as their first #include.
* Removed unnecessary stdbool.h inclusions.
* Use C++ variants of headers when possible.
Joel Rosdahl [Fri, 9 Aug 2019 18:34:07 +0000 (20:34 +0200)]
Remove snprintf replacements
They clash with MinGW-w64 C++ headers, so let’s remove them. Any
reasonably modern system should have them.
Joel Rosdahl [Wed, 7 Aug 2019 19:52:15 +0000 (21:52 +0200)]
Add some C++-ified utility functions
Joel Rosdahl [Wed, 7 Aug 2019 19:30:31 +0000 (21:30 +0200)]
Rename test suite util to legacy_util
This makes room for the Catch2 test suite for util.cpp.
Joel Rosdahl [Wed, 7 Aug 2019 19:21:34 +0000 (21:21 +0200)]
Remove autogenerated suites.hpp
The suites will slowly be converted to the Catch2 framework, so no need
to make it easy to add new legacy suites.
Joel Rosdahl [Wed, 7 Aug 2019 19:00:26 +0000 (21:00 +0200)]
Add Catch2 2.9.1
Joel Rosdahl [Wed, 7 Aug 2019 17:48:49 +0000 (19:48 +0200)]
Add AtomicFile class for updating a file with rename-in-place
Joel Rosdahl [Mon, 29 Jul 2019 20:13:38 +0000 (22:13 +0200)]
Update next version to 4.0
I think that it makes sense to do a major version bump because of the
C++11 requirement and major changes like introduction of result files,
zstd compression and BLAKE2b hashing.
Joel Rosdahl [Fri, 26 Jul 2019 20:40:50 +0000 (22:40 +0200)]
Bump to zstd 1.4.2
Joel Rosdahl [Fri, 26 Jul 2019 18:28:53 +0000 (20:28 +0200)]
Add a subset of fmt 5.3.0
fmt is a “small, safe and fast formatting library”, see
<https://fmt.dev>.
Joel Rosdahl [Thu, 1 Aug 2019 22:04:30 +0000 (00:04 +0200)]
Run clang-format on all code to follow the new code style
If you end up on this commit when running “git blame ...”, it’s probably
a good idea to use “git blame -w ...” to ignore whitespace changes.