]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
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

5 years agoAdd missing include guard
Joel Rosdahl [Sat, 17 Aug 2019 11:04:06 +0000 (13:04 +0200)] 
Add missing include guard

5 years agoFix typo in NEWS
Joel Rosdahl [Fri, 16 Aug 2019 17:27:20 +0000 (19:27 +0200)] 
Fix typo in NEWS

(cherry picked from commit 8c0a53c00f7d1d06aa4837d77f1dff23ae7c1150)

5 years agoDon’t pass -Wno-error to the preprocessor
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)

5 years agoUpdate news with a high-level summary of changes in 4.0 so far
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

5 years agoUse std::min/std::max instead of MIN/MAX macros
Joel Rosdahl [Thu, 15 Aug 2019 18:49:53 +0000 (20:49 +0200)] 
Use std::min/std::max instead of MIN/MAX macros

5 years agoBump to CUDA 10.1.243 for Ubuntu 16.04
Joel Rosdahl [Thu, 15 Aug 2019 18:41:14 +0000 (20:41 +0200)] 
Bump to CUDA 10.1.243 for Ubuntu 16.04

5 years agoFix “(readonly)” part of “ccache -s”
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.

5 years agoC++-ify configuration handling
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.

5 years agoClean up header includes
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.

5 years agoRemove snprintf replacements
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.

5 years agoAdd some C++-ified utility functions
Joel Rosdahl [Wed, 7 Aug 2019 19:52:15 +0000 (21:52 +0200)] 
Add some C++-ified utility functions

5 years agoRename test suite util to legacy_util
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.

5 years agoRemove autogenerated suites.hpp
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.

5 years agoAdd Catch2 2.9.1
Joel Rosdahl [Wed, 7 Aug 2019 19:00:26 +0000 (21:00 +0200)] 
Add Catch2 2.9.1

5 years agoAdd AtomicFile class for updating a file with rename-in-place
Joel Rosdahl [Wed, 7 Aug 2019 17:48:49 +0000 (19:48 +0200)] 
Add AtomicFile class for updating a file with rename-in-place

5 years agoUpdate next version to 4.0
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.

5 years agoBump to zstd 1.4.2
Joel Rosdahl [Fri, 26 Jul 2019 20:40:50 +0000 (22:40 +0200)] 
Bump to zstd 1.4.2

5 years agoAdd a subset of fmt 5.3.0
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>.

5 years agoRun clang-format on all code to follow the new code style
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.

5 years agoDescribe new code style and switch from Uncrustify to clang-format
Joel Rosdahl [Thu, 1 Aug 2019 22:04:24 +0000 (00:04 +0200)] 
Describe new code style and switch from Uncrustify to clang-format

Changing source code style to what I prefer is something that I have
wanted to do for quite some time but I never got to it. Doing it now
feels like a good time since much code will be rewritten anyway as part
of the C++-ification.

5 years agoUse #pragma once for guarding headers
Joel Rosdahl [Thu, 1 Aug 2019 18:49:00 +0000 (20:49 +0200)] 
Use #pragma once for guarding headers

It seems to be supported by all reasonably modern compilers now.

5 years agoSort list
Joel Rosdahl [Wed, 31 Jul 2019 21:46:48 +0000 (23:46 +0200)] 
Sort list

5 years agoC++-ify source code
Joel Rosdahl [Wed, 24 Jul 2019 11:18:17 +0000 (13:18 +0200)] 
C++-ify source code

The ccache source code will be converted to C++, targeting C++11. This
commit only arranges the existing C-style code to be built as C++ code.
This makes it possible to call new C++ code from old C-style code.
Gradual conversion to C++ functionality and idioms will follow in a slow
and controlled fashion – no big bang rewrites.

The alternative would be to convert code in a top-down fashion, i.e.
only calling legacy C code from new C++ code, not the other way around.
That approach is however not a good idea since the code that will
benefit most from being written in proper C++ is code deep down in the
call chains.

Except for renaming source code files to .cpp and .hpp, this commit
makes minimal changes to make the code base buildable again, for
example:

- Instructs configure.ac to look for a mandatory C++11-compliant
  compiler.
- Adds Makefile rules for building C++ code.
- Sets up Travis-CI to pass C++ compiler flags and similar to the build.
- Adds new casts where needed.
- Adds const keywords where needed.
- Renames variables to something else than C++ keywords (e.g.
  “template”).
- Rearranges some code to avoid complaints about goto jumps that cross
  variable lifetimes.

6 years agoAdd x_ prefix to basename and dirname
Joel Rosdahl [Wed, 24 Jul 2019 09:16:14 +0000 (11:16 +0200)] 
Add x_ prefix to basename and dirname

This avoids warnings about differing function prototypes when compiling
as C++ code.

6 years agoRemove unused autoconf checks for ar, cpp and ranlib
Joel Rosdahl [Wed, 24 Jul 2019 08:24:31 +0000 (10:24 +0200)] 
Remove unused autoconf checks for ar, cpp and ranlib

6 years agoUpgrade to use scan-build-7 for the Clang static analyzer
Joel Rosdahl [Wed, 24 Jul 2019 08:17:17 +0000 (10:17 +0200)] 
Upgrade to use scan-build-7 for the Clang static analyzer

6 years agoRefer to autogen.sh correctly in autogen.sh
Joel Rosdahl [Fri, 2 Aug 2019 21:24:27 +0000 (23:24 +0200)] 
Refer to autogen.sh correctly in autogen.sh

Closes #449.

6 years agoFix comparison with the “cu” language
Joel Rosdahl [Fri, 2 Aug 2019 18:37:57 +0000 (20:37 +0200)] 
Fix comparison with the “cu” language

This should have been done in c4fffda0.

Related to PR #381.

6 years agoRevert "Add back support for the “cuda” language"
Joel Rosdahl [Fri, 2 Aug 2019 18:36:32 +0000 (20:36 +0200)] 
Revert "Add back support for the “cuda” language"

This reverts commit 95b0dc5a76bff88ba420a62b7bf2e74e8ea7e300.

NVCC maps the “.cu” extension to “cu” but Clang maps it to “cuda”, so
it’s ambiguous. Let’s ignore the Clang case for now.

Related to PR #381.

6 years agoAdd back support for the “cuda” language
Joel Rosdahl [Fri, 2 Aug 2019 18:20:46 +0000 (20:20 +0200)] 
Add back support for the “cuda” language

Clang apparently recognizes it.

Related to PR #381.

6 years agoRemove .ic extension and cuda/cuda-output languages
Joel Rosdahl [Wed, 31 Jul 2019 19:06:21 +0000 (21:06 +0200)] 
Remove .ic extension and cuda/cuda-output languages

CUDA/NVCC, at least not version 10.1, does not recognize “.ic” as a
valid extension and neither “cuda” nor “cuda-output” as languages.

Also made sure to compare with “cu” instead of “cuda” when detecting
whether to force run_second_cpp.

6 years agotest/suites/nvcc.bash: Test -x cu and -dc options
Alexander Korsunsky [Wed, 17 Apr 2019 16:55:44 +0000 (18:55 +0200)] 
test/suites/nvcc.bash: Test -x cu and -dc options

6 years agoWhen compiling CUDA code, recognize -dc as compilation only argument
Alexander Korsunsky [Tue, 16 Apr 2019 14:38:51 +0000 (16:38 +0200)] 
When compiling CUDA code, recognize -dc as compilation only argument

nvcc's options -dc or --device-c imply -c but also generates device
code. We catch it as an option if our guessed compiler is NVCC

6 years agoAdd cu language as an alias to cuda
Alexander Korsunsky [Tue, 16 Apr 2019 14:38:27 +0000 (16:38 +0200)] 
Add cu language as an alias to cuda

6 years agoFix gperf generation when running on MSYS2 (#448)
Anders Björklund [Mon, 29 Jul 2019 18:22:54 +0000 (20:22 +0200)] 
Fix gperf generation when running on MSYS2 (#448)

Apparently gperf doesn't like DOS linefeeds

6 years agoAdded remaining changes to make tests run on MSYS (#246)
Anders Björklund [Sun, 28 Jul 2019 09:41:09 +0000 (11:41 +0200)] 
Added remaining changes to make tests run on MSYS (#246)

* Skip test that require symlinks, on Windows/Cygwin

* Don't use symlinks for lockfiles on Cygwin

* Seems like objdump has issues on Windows/Cygwin

* Make it possible to run suite in isolation

6 years agoChange from http to https for some URLs
Joel Rosdahl [Tue, 23 Jul 2019 09:39:53 +0000 (11:39 +0200)] 
Change from http to https for some URLs

6 years agoMention libb2 dependency in installation instructions
Joel Rosdahl [Tue, 23 Jul 2019 09:33:52 +0000 (11:33 +0200)] 
Mention libb2 dependency in installation instructions

6 years agoDocument BLAKE2b and clean up after #445
Joel Rosdahl [Mon, 22 Jul 2019 20:52:09 +0000 (22:52 +0200)] 
Document BLAKE2b and clean up after #445

Closes #412.

6 years agoOnly set flags for cross, breaks native build
Anders F Björklund [Mon, 22 Jul 2019 13:25:59 +0000 (15:25 +0200)] 
Only set flags for cross, breaks native build

Need all the auto-detected CPU flags to be set

6 years agoMake sure to pass flags to travis shell commands
Anders F Björklund [Mon, 22 Jul 2019 13:02:14 +0000 (15:02 +0200)] 
Make sure to pass flags to travis shell commands

6 years agoEnable building static local libb2 for non-native
Anders F Björklund [Mon, 22 Jul 2019 12:30:47 +0000 (14:30 +0200)] 
Enable building static local libb2 for non-native

6 years agoGenerated files are in builddir, not srcdir
Anders F Björklund [Mon, 22 Jul 2019 12:29:27 +0000 (14:29 +0200)] 
Generated files are in builddir, not srcdir

6 years agoUpgrade travis docker to xenial, add libb2-dev
Anders F Björklund [Mon, 22 Jul 2019 11:51:43 +0000 (13:51 +0200)] 
Upgrade travis docker to xenial, add libb2-dev

Also upgrade clang from 5 to 7, to match travis

Add new deb requirements from libzstd and libb2

6 years agoMove libb2 source code to src/third_party
Anders F Björklund [Mon, 22 Jul 2019 11:18:24 +0000 (13:18 +0200)] 
Move libb2 source code to src/third_party

6 years agoOnly disable optimizations when cross-compiling
Anders F Björklund [Mon, 22 Jul 2019 08:14:43 +0000 (10:14 +0200)] 
Only disable optimizations when cross-compiling

6 years agoFix travis build by helping clang and cross
Anders F Björklund [Sun, 21 Jul 2019 16:49:12 +0000 (18:49 +0200)] 
Fix travis build by helping clang and cross

6 years agoAdd option to build static libb2 from source
Anders F Björklund [Sun, 21 Jul 2019 14:35:18 +0000 (16:35 +0200)] 
Add option to build static libb2 from source

6 years agoAdd libb2-dev to Travis linux dependencies
Anders F Björklund [Sun, 21 Jul 2019 12:40:11 +0000 (14:40 +0200)] 
Add libb2-dev to Travis linux dependencies

6 years agoUse BLAKE2b checksum instead of bundled MD4
Anders F Björklund [Sun, 21 Jul 2019 12:33:18 +0000 (14:33 +0200)] 
Use BLAKE2b checksum instead of bundled MD4

6 years agoBump to zstd 1.4.1
Joel Rosdahl [Sun, 21 Jul 2019 21:03:49 +0000 (23:03 +0200)] 
Bump to zstd 1.4.1

6 years agoMove third party source code to src/third_party
Joel Rosdahl [Sat, 20 Jul 2019 12:49:17 +0000 (14:49 +0200)] 
Move third party source code to src/third_party

6 years agoFix CCACHE_MAXSIZE with filesystem compression (#444)
Ivan Volnov [Sun, 21 Jul 2019 20:57:51 +0000 (04:57 +0800)] 
Fix CCACHE_MAXSIZE with filesystem compression (#444)

6 years agoPrepare for v3.7.2
Joel Rosdahl [Fri, 19 Jul 2019 07:58:36 +0000 (09:58 +0200)] 
Prepare for v3.7.2

(cherry picked from commit 41ce399ce1a33fd7211754e77fb4a5ddcb1d9eea)

6 years agoUpdate NEWS
Joel Rosdahl [Fri, 19 Jul 2019 07:35:07 +0000 (09:35 +0200)] 
Update NEWS

(cherry picked from commit 4e9b1c1b8e1c98081f284beb2f5766f452fd04fe)

6 years agoDon’t pass -Werror and compilation-only options to the preprocessor
Joel Rosdahl [Fri, 19 Jul 2019 07:22:04 +0000 (09:22 +0200)] 
Don’t pass -Werror and compilation-only options to the preprocessor

Clang emits warnings when it sees unused options, so when ccache runs
the Clang preprocessor separately, options that are not used by the
preprocessor will produce warnings. This means that the user may get
warnings which would not be present when not using ccache. And if
-Werror is present then the preprocessing step fails, which needless to
say is not optimal.

To work around this:

* Options known to have the above mentioned problem are not passed to
  the preprocessor.
* In addition, -Werror is also not passed to the preprocessor so that
  options not properly marked as “compiler only” will only trigger
  warnings, not errors.

Fixes #312.

(cherry picked from commit 5d8585b588fb9f81e741b765603053e4cadcf1ac)

6 years agoRename stripped_args to common_args
Joel Rosdahl [Sat, 11 May 2019 20:19:45 +0000 (22:19 +0200)] 
Rename stripped_args to common_args

(cherry picked from commit bdf4c6b635789e37412fd0b393c637d91ce9cd7b)

6 years agoFix out-of-source build when using --with-libzstd-from-internet
Joel Rosdahl [Wed, 17 Jul 2019 19:06:19 +0000 (21:06 +0200)] 
Fix out-of-source build when using --with-libzstd-from-internet

6 years agoAdd missing headers to release archive list
Joel Rosdahl [Wed, 17 Jul 2019 19:00:11 +0000 (21:00 +0200)] 
Add missing headers to release archive list

6 years agoDon’t build tar.bz2 release archive
Joel Rosdahl [Wed, 17 Jul 2019 18:38:30 +0000 (20:38 +0200)] 
Don’t build tar.bz2 release archive

bz2 seems more or less obsolete since xz compresses better (and
decompresses faster), and gz is more ubiquitous.

6 years agoAdd missing license blurbs to header files
Joel Rosdahl [Wed, 17 Jul 2019 11:59:44 +0000 (13:59 +0200)] 
Add missing license blurbs to header files

6 years agoAdd “and other contributors” to copyright notices
Joel Rosdahl [Wed, 17 Jul 2019 11:45:17 +0000 (13:45 +0200)] 
Add “and other contributors” to copyright notices

6 years agoAdd 64-bit MinGW build
Joel Rosdahl [Wed, 17 Jul 2019 10:59:16 +0000 (12:59 +0200)] 
Add 64-bit MinGW build

6 years agoImprove -x/--show-compression
Joel Rosdahl [Wed, 17 Jul 2019 08:39:30 +0000 (10:39 +0200)] 
Improve -x/--show-compression

- Ignore *.tmp.* files.
- Mention on-disk size (adjusted for disk block size) to make it match
  the cache size reported by “ccache --show-stats”.
- Introduced “space savings” and “of original” percentages.
- Calculate compression ratio only for compressed files.
- Include “incompressible files” size, i.e. total size of .raw files and
  files produced by previous ccache versions.
- Removed file counts since I don’t think that they are of much
  interest.
- Handle unparsable manifest files from previous ccache versions
  gracefully.

6 years agoRemove the kB case from format_*_size* functions
Joel Rosdahl [Wed, 17 Jul 2019 08:28:01 +0000 (10:28 +0200)] 
Remove the kB case from format_*_size* functions

Nobody will ever use or see non-zero kB sizes anyway, and this makes the
zero case for sizes in --show-compression nicer.

6 years agoAdd .editorconfig
Joel Rosdahl [Mon, 15 Jul 2019 20:37:04 +0000 (22:37 +0200)] 
Add .editorconfig

This makes GitHub show tabs as 2 spaces wide, which is what I like (and
also what the code style assumes when counting characters for line
widths).

6 years agoRefactor code for getting manifest/result content size
Joel Rosdahl [Mon, 15 Jul 2019 20:26:41 +0000 (22:26 +0200)] 
Refactor code for getting manifest/result content size

6 years agoDocument -x/--show-compression
Joel Rosdahl [Mon, 15 Jul 2019 20:13:18 +0000 (22:13 +0200)] 
Document -x/--show-compression

6 years agoAdd gitter.im link and badge
Joel Rosdahl [Mon, 15 Jul 2019 20:07:55 +0000 (22:07 +0200)] 
Add gitter.im link and badge

6 years agoNever store stderr output or .d files separately
Joel Rosdahl [Mon, 15 Jul 2019 19:51:10 +0000 (21:51 +0200)] 
Never store stderr output or .d files separately

6 years agoAdd support for file cloning on Mac OS X (APFS)
Joel Rosdahl [Mon, 15 Jul 2019 12:50:28 +0000 (14:50 +0200)] 
Add support for file cloning on Mac OS X (APFS)

6 years agoImplement support for file cloning on Linux (Btrfs/XFS)
Joel Rosdahl [Mon, 15 Jul 2019 12:10:28 +0000 (14:10 +0200)] 
Implement support for file cloning on Linux (Btrfs/XFS)

- Added a new file_clone (CCACHE_FILECLONE) configuration setting. If
  set, ccache uses the FICLONE ioctl if available to clone files to/from
  the cache. If file cloning is not supported by the file system, ccache
  will silently fall back to copying (or hard linking if hard_link is
  enabled).
- Compression will be disabled if file_clone is enabled, just like for
  hard_link.
- file_clone has priority over hard_link.
- Tested on Btrfs and XFS on Linux 5.0.0.

Closes #213.

6 years agoSort envtoconfitems.gperf list
Joel Rosdahl [Mon, 15 Jul 2019 11:23:04 +0000 (13:23 +0200)] 
Sort envtoconfitems.gperf list

6 years agoAdd command to show compression statistics (#440)
Anders Björklund [Mon, 15 Jul 2019 13:28:26 +0000 (15:28 +0200)] 
Add command to show compression statistics (#440)

This will only show information about the files that is knows about
(right magic bytes). So the file count might differ from what is shown
with the regular statistics (which shows all files, including old ones).

The terminology used here is a bit confused, the compression ratio is
supposed to grow upwards. Sometimes known as "space savings" instead,
so list both values (ratio and savings) to make the output more obvious.

6 years agoReimplement the hard link mode
Joel Rosdahl [Fri, 5 Jul 2019 19:43:07 +0000 (21:43 +0200)] 
Reimplement the hard link mode

- Files stored by hard linking are saved as _N.raw files next to their
  .result file, where N is the 0-based index of the entry in the .result
  file.
- The .result file stores expected file sizes for the .raw files and the
  code verifies that they are correct before retrieving the files from
  the cache.
- The manual has been updated to mention the new file size check and
  also some other caveats.

The previous hard link mode implementation was removed in
3999a9ca67e2eabb8457920108b546713f200161 and
a1dbb8a15e034e5a63eb6b4407c9e3ccac469162. The latter commit lists three
points:

1. Hard links are error prone.
2. Compression will make hard links obsolete as a means of saving cache
   space.
3. A future backend storage API will be easier to write.

Point 1 is still true, but since the result file now stores expected
file sizes, many inadvertent modifications of files will be detected.

Point 2 is also still true, but you might want to trade cache size for
speed in cases where increased speed actually is measurable, like with
very large object files.

Point 3 does not quite hold after thinking some more about future APIs.
I think that it will be relatively straight-forward to add operations
like supports_raw_files, get_raw_file and put_raw_file to the API.

6 years agoLet stderr content have an even more special name in result files
Joel Rosdahl [Fri, 5 Jul 2019 19:46:56 +0000 (21:46 +0200)] 
Let stderr content have an even more special name in result files

6 years agoRefactor result_get code into functions per marker type
Joel Rosdahl [Wed, 3 Jul 2019 21:19:59 +0000 (23:19 +0200)] 
Refactor result_get code into functions per marker type

In preparation for reimplementing the hard link mode.

6 years agoAllow NULL checksum parameter for common_header_initialize_for_reading
Joel Rosdahl [Thu, 4 Jul 2019 07:35:05 +0000 (09:35 +0200)] 
Allow NULL checksum parameter for common_header_initialize_for_reading

6 years agoRemove now redundant check for existing result file
Joel Rosdahl [Wed, 3 Jul 2019 18:45:36 +0000 (20:45 +0200)] 
Remove now redundant check for existing result file

6 years agoAvoid logging uninteresting message for deletion of .dwo file
Joel Rosdahl [Wed, 3 Jul 2019 18:44:18 +0000 (20:44 +0200)] 
Avoid logging uninteresting message for deletion of .dwo file

6 years agoSimplify compression_type_from_config
Joel Rosdahl [Wed, 3 Jul 2019 15:26:27 +0000 (17:26 +0200)] 
Simplify compression_type_from_config

6 years agoRefactor common_header_initialize_*
Joel Rosdahl [Wed, 3 Jul 2019 12:36:01 +0000 (14:36 +0200)] 
Refactor common_header_initialize_*

In preparation for adding cache compression statistics and cache
recompression functionality.

6 years agoAvoid letting “-gdwarf*” force “run_second_cpp = true”
Joel Rosdahl [Tue, 2 Jul 2019 12:26:39 +0000 (14:26 +0200)] 
Avoid letting “-gdwarf*” force “run_second_cpp = true”

Fixes #394.

6 years agoImprove error handling and logging of result files copying
Joel Rosdahl [Tue, 2 Jul 2019 12:12:16 +0000 (14:12 +0200)] 
Improve error handling and logging of result files copying

6 years agoProbe whether the compiler produces a .dwo
Joel Rosdahl [Tue, 2 Jul 2019 11:57:11 +0000 (13:57 +0200)] 
Probe whether the compiler produces a .dwo

GCC and Clang behave differently when given e.g. “-gsplit-dwarf -g1”:
GCC produces a .dwo file but Clang doesn’t. Trying to guess how the
different options behave for each compiler is complex and error prone.

Instead, Ccache now probes whether the compiler produced a .dwo and only
stores it if it was produced. On a cache hit, the .dwo is restored if it
exists in the previous result – if it doesn’t exist in the result, it
means that the compilation didn’t produce a .dwo.

Fixes #393.

6 years agoExtract objdump_cmd to test/run where it belongs
Joel Rosdahl [Tue, 2 Jul 2019 11:42:33 +0000 (13:42 +0200)] 
Extract objdump_cmd to test/run where it belongs

6 years agoRemove obsolete conditionals in the split_dwarf test suite
Joel Rosdahl [Tue, 2 Jul 2019 11:21:59 +0000 (13:21 +0200)] 
Remove obsolete conditionals in the split_dwarf test suite

6 years agoAdd --no-compression and --compression-level to misc/performance
Joel Rosdahl [Tue, 2 Jul 2019 08:04:27 +0000 (10:04 +0200)] 
Add --no-compression and --compression-level to misc/performance

6 years agoUse Ubuntu 16.04 for Travis CI
Joel Rosdahl [Tue, 2 Jul 2019 06:25:38 +0000 (08:25 +0200)] 
Use Ubuntu 16.04 for Travis CI

6 years agoQuote CC setting when calling into libzstd’s makefile
Joel Rosdahl [Tue, 2 Jul 2019 06:20:07 +0000 (08:20 +0200)] 
Quote CC setting when calling into libzstd’s makefile

6 years agoExtract code for reading uint64_t in result.c to a macro
Joel Rosdahl [Mon, 1 Jul 2019 18:38:05 +0000 (20:38 +0200)] 
Extract code for reading uint64_t in result.c to a macro

6 years agoExtract common header setup code to functions
Joel Rosdahl [Mon, 1 Jul 2019 14:35:43 +0000 (16:35 +0200)] 
Extract common header setup code to functions

6 years agoAdd checksumming of cached content
Joel Rosdahl [Sun, 30 Jun 2019 12:01:38 +0000 (14:01 +0200)] 
Add checksumming of cached content

Both compressed and uncompressed content are checksummed and verified.
The chosen checksum algorithm is XXH64, which is the same that the zstd
frame format uses (but ccache stores all 64 bits instead of only 32,
because why not?).