]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
5 years agoRemove obsolete x_calloc function
Joel Rosdahl [Sat, 19 Oct 2019 10:39:35 +0000 (12:39 +0200)] 
Remove obsolete x_calloc function

5 years agoMake ccache buildable with Clang 9
Joel Rosdahl [Fri, 18 Oct 2019 17:28:33 +0000 (19:28 +0200)] 
Make ccache buildable with Clang 9

5 years agoMake remember_include_file free from gotos
Joel Rosdahl [Wed, 16 Oct 2019 18:51:50 +0000 (20:51 +0200)] 
Make remember_include_file free from gotos

5 years agoAdd Thomas Otto (totph) to .mailmap
Joel Rosdahl [Tue, 15 Oct 2019 19:20:14 +0000 (21:20 +0200)] 
Add Thomas Otto (totph) to .mailmap

5 years agoTweak contribution guidelines
Joel Rosdahl [Tue, 15 Oct 2019 18:13:19 +0000 (20:13 +0200)] 
Tweak contribution guidelines

5 years agoUse nonstd::string_view where appropriate
Joel Rosdahl [Sun, 13 Oct 2019 20:34:37 +0000 (22:34 +0200)] 
Use nonstd::string_view where appropriate

5 years agoUse #include "third_party/..." consistently to include third party code
Joel Rosdahl [Sun, 13 Oct 2019 14:44:30 +0000 (16:44 +0200)] 
Use #include "third_party/..." consistently to include third party code

5 years agoRemove now superfluous size check of uncompressed files
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.

5 years agoAdd nonstd::string_view 1.3.0
Joel Rosdahl [Sun, 13 Oct 2019 14:03:14 +0000 (16:03 +0200)] 
Add nonstd::string_view 1.3.0

5 years agoAdd nonstd::optional 3.2.0
Joel Rosdahl [Sun, 13 Oct 2019 14:01:56 +0000 (16:01 +0200)] 
Add nonstd::optional 3.2.0

5 years agoUpgrade to fmt 6.0.0
Joel Rosdahl [Sun, 13 Oct 2019 13:49:51 +0000 (15:49 +0200)] 
Upgrade to fmt 6.0.0

5 years agoPretty-print embedded_file_type in log messages
Joel Rosdahl [Sat, 19 Oct 2019 08:57:24 +0000 (10:57 +0200)] 
Pretty-print embedded_file_type in log messages

5 years agoReduce casting related to FileType
Joel Rosdahl [Sat, 19 Oct 2019 08:37:08 +0000 (10:37 +0200)] 
Reduce casting related to FileType

5 years agoConvert result type string to an enum (#478)
Thomas Otto [Sat, 19 Oct 2019 08:28:57 +0000 (10:28 +0200)] 
Convert result type string to an enum (#478)

5 years agoFix warning during configure in out of tree build (#479)
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

5 years agotest output: only use ansi codes when run in a terminal
Thomas Otto [Thu, 17 Oct 2019 11:26:50 +0000 (13:26 +0200)] 
test output: only use ansi codes when run in a terminal

5 years agotest output: improve readability on light backgrounds
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

5 years agoRemove left-over CacheEntryReader::CacheEntryReader doc string
Joel Rosdahl [Sun, 13 Oct 2019 14:04:30 +0000 (16:04 +0200)] 
Remove left-over CacheEntryReader::CacheEntryReader doc string

5 years agoFix comment after renaming util.cpp to legacy_util.cpp
Joel Rosdahl [Sun, 13 Oct 2019 14:28:03 +0000 (16:28 +0200)] 
Fix comment after renaming util.cpp to legacy_util.cpp

5 years agoAdd missing #pragma once to File.hpp
Joel Rosdahl [Mon, 14 Oct 2019 16:56:50 +0000 (18:56 +0200)] 
Add missing #pragma once to File.hpp

5 years agoAdd -MQ to compilation flags to make dependency files work properly
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)

5 years agoFix an out-of-bounds read when logging (#475)
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.

5 years agoRecompress in parallel
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.

5 years agoAdd -X/--recompress option
Joel Rosdahl [Sun, 6 Oct 2019 21:08:00 +0000 (23:08 +0200)] 
Add -X/--recompress option

5 years agoLet cache entry writer/reader update/verify checksums
Joel Rosdahl [Sun, 6 Oct 2019 20:21:46 +0000 (22:21 +0200)] 
Let cache entry writer/reader update/verify checksums

5 years agoMake File movable and noncopyable
Joel Rosdahl [Sun, 6 Oct 2019 19:43:39 +0000 (21:43 +0200)] 
Make File movable and noncopyable

5 years agoRename file_size to file_size_on_disk and improve its return type
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

5 years agoRefactor result/manifest reading/writing
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.

5 years agoAdd unit test of AtomicFile
Joel Rosdahl [Mon, 30 Sep 2019 19:28:20 +0000 (21:28 +0200)] 
Add unit test of AtomicFile

5 years agoAdd AtomicFile::stream
Joel Rosdahl [Mon, 30 Sep 2019 19:28:12 +0000 (21:28 +0200)] 
Add AtomicFile::stream

5 years agoRename AtomicFile::close to commit
Joel Rosdahl [Mon, 30 Sep 2019 18:37:03 +0000 (20:37 +0200)] 
Rename AtomicFile::close to commit

This better conveys the semantics.

5 years agoInclude .tmp. in AtomicFile names
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.

5 years agoAdd Util::big_endian_to_int and Util::int_to_big_endian
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

5 years agoAdd Util::get_file_size
Joel Rosdahl [Sun, 29 Sep 2019 13:07:24 +0000 (15:07 +0200)] 
Add Util::get_file_size

5 years agoAdd std::make_unique implementation
Joel Rosdahl [Thu, 26 Sep 2019 17:53:41 +0000 (19:53 +0200)] 
Add std::make_unique implementation

5 years agoUse UpperCamelCase instead of snake_case for namespaces
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.

5 years agoMake AtomicFile::Type values lower case
Joel Rosdahl [Tue, 24 Sep 2019 19:50:27 +0000 (21:50 +0200)] 
Make AtomicFile::Type values lower case

5 years agoExtract temporary file creation code into a function
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.

5 years agoAdd and use Checksum class
Joel Rosdahl [Wed, 18 Sep 2019 19:17:47 +0000 (21:17 +0200)] 
Add and use Checksum class

The class wraps an XXH64 state.

5 years agoAdd and use CacheFile::Type and CacheFile::type
Joel Rosdahl [Sun, 8 Sep 2019 17:29:12 +0000 (19:29 +0200)] 
Add and use CacheFile::Type and CacheFile::type

5 years agoMove parse_int to util
Joel Rosdahl [Sat, 7 Sep 2019 17:55:38 +0000 (19:55 +0200)] 
Move parse_int to util

5 years agoFix test suite problems on OS X
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>
5 years agoForce regeneration of autotools stuff in autogen.sh
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>
5 years agoAdd .DS_Store to .gitignore
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>
5 years agoMake detection of supported Clang warning flags actually work
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>
5 years agoAdd support for -MF=arg as understood by EDG-based compilers
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)

5 years agoOnly pass implicit -MQ to preprocessor if needed
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)

5 years agoUpdate NEWS
Joel Rosdahl [Thu, 3 Oct 2019 18:15:52 +0000 (20:15 +0200)] 
Update NEWS

(cherry picked from commit 3c0e894c58b887bc40e2be99e722bd9b68df8689)

5 years agoSimplify code
Breno Guimaraes [Sat, 21 Sep 2019 21:27:52 +0000 (17:27 -0400)] 
Simplify code

5 years agoExtract function for free+nullify pattern
Breno Guimaraes [Sat, 14 Sep 2019 00:23:37 +0000 (20:23 -0400)] 
Extract function for free+nullify pattern

5 years agoDont free/null variable twice
Breno Guimaraes [Sat, 21 Sep 2019 19:26:08 +0000 (15:26 -0400)] 
Dont free/null variable twice

5 years agoDon’t crash if localtime returns null pointer in localtime_r replacement
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)

5 years agoInclude compiler-only arguments in the hash
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)

5 years agoAdd configure check for Clang flags for disabling warnings
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.

5 years agoMove dev mode configure check to the top
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.

5 years agoAdd configure macro AX_CHECK_COMPILE_FLAG
Joel Rosdahl [Sun, 15 Sep 2019 20:30:54 +0000 (22:30 +0200)] 
Add configure macro AX_CHECK_COMPILE_FLAG

5 years agoRemove obsolete configure check related to snprintf replacements
Joel Rosdahl [Sun, 15 Sep 2019 20:30:34 +0000 (22:30 +0200)] 
Remove obsolete configure check related to snprintf replacements

5 years agoClarify 3.7.4 news items 467/head
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.

5 years agoPrepare for v3.7.4
Joel Rosdahl [Thu, 12 Sep 2019 19:14:09 +0000 (21:14 +0200)] 
Prepare for v3.7.4

(cherry picked from commit fbdb291fbf0fc749ed44fc510ff023c8030359ff)

5 years agoUpdate NEWS
Joel Rosdahl [Thu, 12 Sep 2019 19:14:06 +0000 (21:14 +0200)] 
Update NEWS

(cherry picked from commit d5697e4bcb04cf78245e30fbebdc4536d66c290a)

5 years agoSupport GCC 9’s -gz=[type] option
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)

5 years agoUpdate NEWS
Joel Rosdahl [Sat, 7 Sep 2019 17:45:10 +0000 (19:45 +0200)] 
Update NEWS

5 years agoAdd missing include guard
Joel Rosdahl [Sat, 7 Sep 2019 17:41:00 +0000 (19:41 +0200)] 
Add missing include guard

5 years agoSort function definitions
Joel Rosdahl [Fri, 6 Sep 2019 18:01:28 +0000 (20:01 +0200)] 
Sort function definitions

5 years agoSet sysconfdir to /etc when dist checking
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.

5 years agoDon’t fail on error when dist checking
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.

5 years agoMerge dist checks for using libzstd/libb2 from the Internet
Joel Rosdahl [Thu, 5 Sep 2019 20:00:41 +0000 (22:00 +0200)] 
Merge dist checks for using libzstd/libb2 from the Internet

5 years agoSort .gitignore
Joel Rosdahl [Thu, 5 Sep 2019 19:54:58 +0000 (21:54 +0200)] 
Sort .gitignore

5 years agoDon’t error out if a libzstd/libb2 Makefile doesn’t exist when cleaning
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

5 years agoAdd missing fmt headers to dist archive
Joel Rosdahl [Thu, 5 Sep 2019 19:39:40 +0000 (21:39 +0200)] 
Add missing fmt headers to dist archive

5 years agoAdd progress bar for -x/--show-compression
Joel Rosdahl [Wed, 4 Sep 2019 19:11:04 +0000 (21:11 +0200)] 
Add progress bar for -x/--show-compression

5 years agoAdd progress bar for -c/--cleanup and -C/--clear
Joel Rosdahl [Wed, 4 Sep 2019 18:02:04 +0000 (20:02 +0200)] 
Add progress bar for -c/--cleanup and -C/--clear

5 years agoConstify file_size
Joel Rosdahl [Wed, 4 Sep 2019 17:53:12 +0000 (19:53 +0200)] 
Constify file_size

5 years agoAdd util::for_each_level_1_subdir function
Joel Rosdahl [Wed, 28 Aug 2019 20:44:13 +0000 (22:44 +0200)] 
Add util::for_each_level_1_subdir function

5 years agoAdd util::get_level_1_files function
Joel Rosdahl [Wed, 28 Aug 2019 20:41:23 +0000 (22:41 +0200)] 
Add util::get_level_1_files function

5 years agoAdd ProgressBar class
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.

5 years agoAdd util::ends_with
Joel Rosdahl [Sun, 25 Aug 2019 20:17:22 +0000 (22:17 +0200)] 
Add util::ends_with

5 years agoFix include so that Cppcheck finds it
Joel Rosdahl [Sun, 25 Aug 2019 11:52:43 +0000 (13:52 +0200)] 
Fix include so that Cppcheck finds it

5 years agoRemove no longer matched Cppcheck suppression
Joel Rosdahl [Sun, 25 Aug 2019 09:34:06 +0000 (11:34 +0200)] 
Remove no longer matched Cppcheck suppression

5 years agoFix Cppcheck warning about always false value
Joel Rosdahl [Sun, 25 Aug 2019 09:29:17 +0000 (11:29 +0200)] 
Fix Cppcheck warning about always false value

5 years agoMake legacy_suites a constant
Joel Rosdahl [Sun, 25 Aug 2019 09:28:54 +0000 (11:28 +0200)] 
Make legacy_suites a constant

5 years agoRemove left-over statement
Joel Rosdahl [Sun, 25 Aug 2019 09:24:57 +0000 (11:24 +0200)] 
Remove left-over statement

5 years agoAdd util::create_dir, replacing create_parent_dirs and create_dir
Joel Rosdahl [Sun, 25 Aug 2019 08:49:00 +0000 (10:49 +0200)] 
Add util::create_dir, replacing create_parent_dirs and create_dir

5 years agoImprove documentation of util::read_file/write_file
Joel Rosdahl [Sat, 24 Aug 2019 20:34:23 +0000 (22:34 +0200)] 
Improve documentation of util::read_file/write_file

5 years agoAdd util::dir_name
Joel Rosdahl [Sat, 24 Aug 2019 20:18:33 +0000 (22:18 +0200)] 
Add util::dir_name

5 years agoAdd util::base_name
Joel Rosdahl [Sat, 24 Aug 2019 20:17:51 +0000 (22:17 +0200)] 
Add util::base_name

5 years agoExtract Catch2 main to a separate object file
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.

5 years agoC++-ify create_cachedir_tag
Joel Rosdahl [Sat, 24 Aug 2019 12:31:51 +0000 (14:31 +0200)] 
C++-ify create_cachedir_tag

5 years agoDon’t fail if CACHEDIR.TAG can’t be created
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.

5 years agoReplace third party hashtable with std::unordered_map
Joel Rosdahl [Fri, 23 Aug 2019 17:46:40 +0000 (19:46 +0200)] 
Replace third party hashtable with std::unordered_map

5 years agoFix code style
Joel Rosdahl [Thu, 29 Aug 2019 19:32:47 +0000 (21:32 +0200)] 
Fix code style

5 years agoIgnore archives and directories for libb2 and libzstd (#459)
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>
5 years agoconfigure: Update libzstd to 1.4.3 (#458)
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>
5 years agoWin32: make_relative_path also accept /c/users (#455) 470/head
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

5 years agodoc: Add references to configuration items
Joel Rosdahl [Sat, 17 Aug 2019 21:29:14 +0000 (23:29 +0200)] 
doc: Add references to configuration items

5 years agodoc: Add anchors to configuration items
Joel Rosdahl [Sat, 17 Aug 2019 21:08:32 +0000 (23:08 +0200)] 
doc: Add anchors to configuration items

5 years agodoc: Mention that XXH64 is used for checksumming
Joel Rosdahl [Sat, 17 Aug 2019 21:02:01 +0000 (23:02 +0200)] 
doc: Mention that XXH64 is used for checksumming

5 years agodoc: Remove note about hard links caveats from feature summary
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.

5 years agoPrepare for v3.7.3
Joel Rosdahl [Sat, 17 Aug 2019 20:07:43 +0000 (22:07 +0200)] 
Prepare for v3.7.3

(cherry picked from commit fc69e8243743a2ed9305ff58c00e4fb23cb55237)

5 years agoUpdate NEWS
Joel Rosdahl [Sat, 17 Aug 2019 19:59:15 +0000 (21:59 +0200)] 
Update NEWS