]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Fri, 1 Nov 2019 20:24:55 +0000 (21:24 +0100)]
AtomicFile: Cope with write error (e.g. due to full disk) when closing
Thomas Otto [Fri, 1 Nov 2019 20:58:21 +0000 (21:58 +0100)]
Fix and test interaction between fmt and nonstd::string_view (#481)
Empty string_views could not be handled and formatting
did not stop until the first \0 was encountered.
Joel Rosdahl [Wed, 23 Oct 2019 19:02:03 +0000 (21:02 +0200)]
Tweak grammar
Joel Rosdahl [Wed, 23 Oct 2019 18:58:09 +0000 (20:58 +0200)]
Mention the AVX2 algorithm in NEWS
Erik Johansson [Wed, 23 Oct 2019 18:52:49 +0000 (20:52 +0200)]
Add AVX2 variant of check_for_temporal_macros (#476)
By using AVX (Advanced Vector Extensions) the search for __DATE__ and __TIME__
in the input source becomes much faster. On my machine, ccache spends ~4.9e6
cycles in check_for_temporal_macros when compiling src/ccache.cpp. With USE_AVX
set that figure goes down to ~6.7e5.
Compiling all of ccache with -mavx2 makes the unittest crash with "Illegal
instruction: 4" when run on travis (Mac OS X). My guess is that -mavx2 makes
clang generate code that uses instructions that doesn't work on the CPUs used
on the build server (see [0]).
Instead compile only check_for_temporal_macros_avx2 with -mavx2 as we can
control when that function is called (i.e. only do it when the cpu supports
it).
[0] - https://stackoverflow.com/questions/
48333342 /os-x-illegal-instruction-4-in-travis-ci
Joel Rosdahl [Wed, 23 Oct 2019 18:35:10 +0000 (20:35 +0200)]
Fix FormatNonstdStringView.hpp name in non_third_party_headers
Joel Rosdahl [Tue, 22 Oct 2019 18:48:58 +0000 (20:48 +0200)]
Prepare for v3.7.5
(cherry picked from commit
5d9a289f594c22361c18baf41a8a9aa5bd6a1026 )
Joel Rosdahl [Tue, 22 Oct 2019 18:16:29 +0000 (20:16 +0200)]
Update NEWS
(cherry picked from commit
e83a77c95f0853f53d4cffbd7df61dfdbd84b9d1 )
Joel Rosdahl [Tue, 22 Oct 2019 18:16:14 +0000 (20:16 +0200)]
Fix spelling
(cherry picked from commit
c38b0fd2441a809086fc3067968c2bcc7d2305d5 )
Joel Rosdahl [Tue, 22 Oct 2019 18:29:19 +0000 (20:29 +0200)]
Please Clang’s -Wmissing-variable-declarations
(cherry picked from commit
736237aeb21eceaf7a80f13d59ad47c35d76b8bb )
Joel Rosdahl [Tue, 22 Oct 2019 18:04:01 +0000 (20:04 +0200)]
Increase interval for cleaning up $CCACHE_DIR/tmp to 2 days
This will reduce problems when adjusting system time; see #480.
(cherry picked from commit
e1fc59223518c53ab227d224a36fe2eeead127eb )
Joel Rosdahl [Mon, 21 Oct 2019 18:06:22 +0000 (20:06 +0200)]
Don’t fail fatally if temporary cpp_stderr file is missing
If the temporary cpp_stderr file is missing when the compilation command
has finished then either some user removed it or ccache removed it in
clean_up_internal_tempdir (since the compilation took more than hour or
the system clock was adjusted?). In either case, let’s just fall back to
running the real compiler instead of failing fatally.
Fixes #480 and #154.
(cherry picked from commit
c74dbfe5d43fc23733bd44839b9bd119da94ba26 )
Joel Rosdahl [Sat, 19 Oct 2019 10:43:39 +0000 (12:43 +0200)]
Improve functions related to (l)stat-ing
Introduced a Stat class that represents a “struct stat”. The class
replaces the utility functions x_lstat, x_stat, file_size_on_disk and
is_symlink, and it provides an easier to use interface than the macros
associated with stat structs.
Joel Rosdahl [Sat, 19 Oct 2019 10:43:20 +0000 (12:43 +0200)]
Remove obsolete traverse function
Joel Rosdahl [Sat, 19 Oct 2019 10:39:35 +0000 (12:39 +0200)]
Remove obsolete x_calloc function
Joel Rosdahl [Fri, 18 Oct 2019 17:28:33 +0000 (19:28 +0200)]
Make ccache buildable with Clang 9
Joel Rosdahl [Wed, 16 Oct 2019 18:51:50 +0000 (20:51 +0200)]
Make remember_include_file free from gotos
Joel Rosdahl [Tue, 15 Oct 2019 19:20:14 +0000 (21:20 +0200)]
Add Thomas Otto (totph) to .mailmap
Joel Rosdahl [Tue, 15 Oct 2019 18:13:19 +0000 (20:13 +0200)]
Tweak contribution guidelines
Joel Rosdahl [Sun, 13 Oct 2019 20:34:37 +0000 (22:34 +0200)]
Use nonstd::string_view where appropriate
Joel Rosdahl [Sun, 13 Oct 2019 14:44:30 +0000 (16:44 +0200)]
Use #include "third_party/..." consistently to include third party code
Joel Rosdahl [Sun, 13 Oct 2019 14:28:24 +0000 (16:28 +0200)]
Remove now superfluous size check of uncompressed files
Uncompressed cache files have a trailing checksum as well; this wasn’t
the case earlier in the format design process.
Joel Rosdahl [Sun, 13 Oct 2019 14:03:14 +0000 (16:03 +0200)]
Add nonstd::string_view 1.3.0
Joel Rosdahl [Sun, 13 Oct 2019 14:01:56 +0000 (16:01 +0200)]
Add nonstd::optional 3.2.0
Joel Rosdahl [Sun, 13 Oct 2019 13:49:51 +0000 (15:49 +0200)]
Upgrade to fmt 6.0.0
Joel Rosdahl [Sat, 19 Oct 2019 08:57:24 +0000 (10:57 +0200)]
Pretty-print embedded_file_type in log messages
Joel Rosdahl [Sat, 19 Oct 2019 08:37:08 +0000 (10:37 +0200)]
Reduce casting related to FileType
Thomas Otto [Sat, 19 Oct 2019 08:28:57 +0000 (10:28 +0200)]
Convert result type string to an enum (#478)
Erik Johansson [Fri, 18 Oct 2019 17:25:44 +0000 (19:25 +0200)]
Fix warning during configure in out of tree build (#479)
../configure: line 2250: src/version.cpp: No such file or directory
Thomas Otto [Thu, 17 Oct 2019 11:26:50 +0000 (13:26 +0200)]
test output: only use ansi codes when run in a terminal
Thomas Otto [Thu, 17 Oct 2019 09:33:43 +0000 (11:33 +0200)]
test output: improve readability on light backgrounds
`bold()` now only writes bold text, not bold and white text
Joel Rosdahl [Sun, 13 Oct 2019 14:04:30 +0000 (16:04 +0200)]
Remove left-over CacheEntryReader::CacheEntryReader doc string
Joel Rosdahl [Sun, 13 Oct 2019 14:28:03 +0000 (16:28 +0200)]
Fix comment after renaming util.cpp to legacy_util.cpp
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