]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
7 years agoPut "calculate preprocessor hash" code into "if" block
Geert Kloosterman [Wed, 4 Apr 2018 20:49:14 +0000 (22:49 +0200)] 
Put "calculate preprocessor hash" code into "if" block

In a following commit we will execute this code conditionally.

Even though the change is simple, the diff looks rather ugly (unless
when ignoring whitespace differences).  Having this step as a separate
commit should make the following commit more clear.

Chose to not factor it out into a separate function because of the
amount of local variables referenced.

7 years agoMove update_cached_result_globals() up within source file
Geert Kloosterman [Wed, 4 Apr 2018 20:05:46 +0000 (22:05 +0200)] 
Move update_cached_result_globals() up within source file

Move function so that we can use it in `to_cache()`.

7 years agoAdd missing free()
Geert Kloosterman [Wed, 4 Apr 2018 19:53:49 +0000 (21:53 +0200)] 
Add missing free()

7 years agoAdd option handling code for `depend_mode`
Geert Kloosterman [Wed, 4 Apr 2018 19:26:34 +0000 (21:26 +0200)] 
Add option handling code for `depend_mode`

Only code for the option itself, the option is not being used yet.

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Sun, 25 Mar 2018 20:25:23 +0000 (22:25 +0200)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Prepare for v3.4.2
  direct .i mode: Don't create tmp.cpp_stderr file at all

7 years agoPrepare for v3.4.2 v3.4.2
Joel Rosdahl [Sun, 25 Mar 2018 20:22:56 +0000 (22:22 +0200)] 
Prepare for v3.4.2

7 years agodirect .i mode: Don't create tmp.cpp_stderr file at all
peterbudai@hotmail.com [Fri, 16 Mar 2018 22:54:16 +0000 (23:54 +0100)] 
direct .i mode: Don't create tmp.cpp_stderr file at all

Create tmp file only when it's actually needed.

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Tue, 13 Mar 2018 14:02:16 +0000 (15:02 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Clean up
  win32: Silence compiler warnings
  cleanup: Improve robustness when multiple cleanups run concurrently
  cleanup: Log size before cleaning
  Add x_try_unlink utility function
  test: Use helper functions instead of custom code
  test: Improve error messages from expect_{equal,different}_files

7 years agoClean up
Joel Rosdahl [Tue, 13 Mar 2018 13:38:09 +0000 (14:38 +0100)] 
Clean up

7 years agowin32: Silence compiler warnings
peterbudai@hotmail.com [Mon, 12 Mar 2018 20:38:39 +0000 (21:38 +0100)] 
win32: Silence compiler warnings

7 years agocleanup: Improve robustness when multiple cleanups run concurrently
Joel Rosdahl [Mon, 12 Mar 2018 21:25:28 +0000 (22:25 +0100)] 
cleanup: Improve robustness when multiple cleanups run concurrently

The file count/size counters are now intentionally subtracted even if
there file to delete has disappeared since the final cache size
calculation will be incorrect if they aren’t. This can happen when there
are several parallel ongoing cleanups of the same subdirectory.

Also removed the “delete sibling files” logic; it’s unnecessary for all
siblings except .stderr since that’s the only file in a result that is
optional. Any other missing file will be detected by
get_file_from_cache.

7 years agocleanup: Log size before cleaning
Joel Rosdahl [Mon, 12 Mar 2018 21:05:17 +0000 (22:05 +0100)] 
cleanup: Log size before cleaning

7 years agoAdd x_try_unlink utility function
Joel Rosdahl [Mon, 12 Mar 2018 20:48:59 +0000 (21:48 +0100)] 
Add x_try_unlink utility function

It behaves like x_unlink but doesn’t log a failure if the file is
missing.

7 years agotest: Use helper functions instead of custom code
Joel Rosdahl [Mon, 12 Mar 2018 20:30:28 +0000 (21:30 +0100)] 
test: Use helper functions instead of custom code

7 years agotest: Improve error messages from expect_{equal,different}_files
Joel Rosdahl [Mon, 12 Mar 2018 20:20:17 +0000 (21:20 +0100)] 
test: Improve error messages from expect_{equal,different}_files

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Sun, 11 Mar 2018 15:08:37 +0000 (16:08 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Update NEWS
  Clean up
  Support out-of-source builds
  Be consistent with “Clang” and “NVCC” names in NEWS
  Don’t apply Clang workaround for PCH dependencies for other compilers

7 years agoUpdate NEWS
Joel Rosdahl [Sun, 11 Mar 2018 15:08:21 +0000 (16:08 +0100)] 
Update NEWS

7 years agoClean up
Joel Rosdahl [Sun, 11 Mar 2018 14:49:06 +0000 (15:49 +0100)] 
Clean up

7 years agoSupport out-of-source builds
Anders F Björklund [Sat, 10 Mar 2018 19:14:08 +0000 (20:14 +0100)] 
Support out-of-source builds

Separate (read-only) $srcdir and (output) $builddir

Still support both developer mode and dist (+check).

7 years agoBe consistent with “Clang” and “NVCC” names in NEWS
Joel Rosdahl [Sun, 11 Mar 2018 08:21:27 +0000 (09:21 +0100)] 
Be consistent with “Clang” and “NVCC” names in NEWS

7 years agoDon’t apply Clang workaround for PCH dependencies for other compilers
Joel Rosdahl [Sun, 11 Mar 2018 08:19:52 +0000 (09:19 +0100)] 
Don’t apply Clang workaround for PCH dependencies for other compilers

Closes #235.

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Wed, 7 Mar 2018 20:46:15 +0000 (21:46 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  cleanup: Remove special-casing of files from ccache 2.x
  Fix debug_prefix_map suite
  Improve AsciiDoc markup
  Improve man page generation
  Remove redundant .gitignore entries

7 years agocleanup: Remove special-casing of files from ccache 2.x
Joel Rosdahl [Tue, 6 Mar 2018 20:11:23 +0000 (21:11 +0100)] 
cleanup: Remove special-casing of files from ccache 2.x

It feels like a safe assumption that nobody will run ccache 3.4.x and
2.x on the same cache directory.

7 years agoFix debug_prefix_map suite
Timofei Kushnir [Wed, 28 Feb 2018 07:48:10 +0000 (10:48 +0300)] 
Fix debug_prefix_map suite

7 years agoImprove AsciiDoc markup
Joel Rosdahl [Tue, 6 Mar 2018 19:44:40 +0000 (20:44 +0100)] 
Improve AsciiDoc markup

7 years agoImprove man page generation
Joel Rosdahl [Sun, 4 Mar 2018 09:45:50 +0000 (10:45 +0100)] 
Improve man page generation

* Use AsciiDoc’s a2x tool instead of running xsltproc explicitly.
* Stow away ccache.1 in doc.
* Make AsciiDoc literals stand out as bold in the man page. We can now
  use properly literals instead of emphasis in the manual.

7 years agoRemove redundant .gitignore entries
Joel Rosdahl [Sun, 4 Mar 2018 09:44:19 +0000 (10:44 +0100)] 
Remove redundant .gitignore entries

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Thu, 1 Mar 2018 20:26:08 +0000 (21:26 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Change extension of AsciiDoc files to .adoc

7 years agoChange extension of AsciiDoc files to .adoc
Joel Rosdahl [Thu, 1 Mar 2018 20:20:05 +0000 (21:20 +0100)] 
Change extension of AsciiDoc files to .adoc

This should make them nicely rendered in the GitHub file tree.

7 years agoChange extension of AsciiDoc files to .adoc
Joel Rosdahl [Thu, 1 Mar 2018 20:20:05 +0000 (21:20 +0100)] 
Change extension of AsciiDoc files to .adoc

This should make them nicely rendered in the GitHub file tree.

7 years agoUpdate NEWS
Joel Rosdahl [Thu, 1 Mar 2018 20:02:16 +0000 (21:02 +0100)] 
Update NEWS

7 years agoApply code review suggestions
Geert Kloosterman [Thu, 1 Mar 2018 06:59:32 +0000 (07:59 +0100)] 
Apply code review suggestions

7 years agoAllow a pre-computed checksum file for precompiled headers
Geert Kloosterman [Mon, 19 Feb 2018 14:24:55 +0000 (15:24 +0100)] 
Allow a pre-computed checksum file for precompiled headers

Having large precompiled header files slows down direct mode off
CCache considerably. Allow CCache to check against a (much smaller)
pre-computed checksum file instead of the precompiled header file
itself. This checksum file will be used in the manifest instead of
the actual precompiled header file.

Note that to make this to work, the build system needs to keep a
checksum file in sync with the precompiled header.

The behavior can be activated by the `pch_external_checksum` option.

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Wed, 28 Feb 2018 21:13:04 +0000 (22:13 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  The Dockerfile was moved to a subdirectory

7 years agoThe Dockerfile was moved to a subdirectory
Anders F Björklund [Wed, 28 Feb 2018 16:30:38 +0000 (17:30 +0100)] 
The Dockerfile was moved to a subdirectory

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Sun, 25 Feb 2018 08:13:47 +0000 (09:13 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Fix paths to bundled zlib

7 years agoFix paths to bundled zlib
Joel Rosdahl [Sun, 25 Feb 2018 08:09:02 +0000 (09:09 +0100)] 
Fix paths to bundled zlib

Regression from the source code rearrangement in 4aa357782e48.

Also added a distcheck that verifies that “./configure
--with-bundled-zlib” works.

Closes #229.

7 years agoMerge branch '3.4-maint'
Joel Rosdahl [Wed, 21 Feb 2018 20:00:35 +0000 (21:00 +0100)] 
Merge branch '3.4-maint'

* 3.4-maint:
  Hash preprocessed headers located in “.gch directories” correctly

7 years agoHash preprocessed headers located in “.gch directories” correctly
Joel Rosdahl [Wed, 21 Feb 2018 19:58:45 +0000 (20:58 +0100)] 
Hash preprocessed headers located in “.gch directories” correctly

Previously, ccache would not pick up changes to such precompiled
headers, risking false positive cache hits.

7 years agoRename CCACHE_CC to CCACHE_COMPILER
Joel Rosdahl [Sat, 17 Feb 2018 09:51:20 +0000 (10:51 +0100)] 
Rename CCACHE_CC to CCACHE_COMPILER

7 years agoPrepare for v3.4.1 v3.4.1
Joel Rosdahl [Sun, 11 Feb 2018 18:14:47 +0000 (19:14 +0100)] 
Prepare for v3.4.1

7 years agoFix printing of version number in “ccache --version”
Joel Rosdahl [Sun, 11 Feb 2018 18:07:51 +0000 (19:07 +0100)] 
Fix printing of version number in “ccache --version”

Closes #225.

7 years agoPrepare for v3.4 v3.4
Joel Rosdahl [Sun, 11 Feb 2018 14:24:11 +0000 (15:24 +0100)] 
Prepare for v3.4

7 years agoUpdate lookup tables with new location of .gperf files
Joel Rosdahl [Sun, 11 Feb 2018 14:18:15 +0000 (15:18 +0100)] 
Update lookup tables with new location of .gperf files

7 years agoAdd update-authors make recipe and use it
Joel Rosdahl [Sat, 10 Feb 2018 20:59:07 +0000 (21:59 +0100)] 
Add update-authors make recipe and use it

7 years agoImprove README.md
Joel Rosdahl [Wed, 7 Feb 2018 18:13:16 +0000 (19:13 +0100)] 
Improve README.md

7 years agoRearrange files into suitable subdirectories, e.g. src and doc
Joel Rosdahl [Wed, 7 Feb 2018 11:14:49 +0000 (12:14 +0100)] 
Rearrange files into suitable subdirectories, e.g. src and doc

The top directory has become too crowded.

7 years agoSimplify initialize() slightly
Joel Rosdahl [Tue, 6 Feb 2018 20:58:19 +0000 (21:58 +0100)] 
Simplify initialize() slightly

7 years agoTreat unreadable conf file like missing instead of a fatal error
Joel Rosdahl [Tue, 6 Feb 2018 20:49:55 +0000 (21:49 +0100)] 
Treat unreadable conf file like missing instead of a fatal error

This reverts 0b18af47 and implements a better solution.

The major reason is to keep ccache transparent, i.e. to still have the
following behavior:

* If ccache returns exit code == 0, then any produced stderr comes from
  the compiler and only from the compiler.
* If ccache returns exit code != 0, then ccache may print error messages
  of its own.

The reason is that autoconf configure scripts have been known to fail
tests if the compiler emits anything to stderr even if the produced
result actually works. (And printing to stdout is also a no-no.)

7 years agoDocument caveats related to colored warnings from compilers
Joel Rosdahl [Mon, 5 Feb 2018 20:58:55 +0000 (21:58 +0100)] 
Document caveats related to colored warnings from compilers

7 years agoDocument more pitfalls with hard links
Joel Rosdahl [Mon, 5 Feb 2018 18:11:02 +0000 (19:11 +0100)] 
Document more pitfalls with hard links

7 years agoUse strftime instead of obsolete asctime function
Joel Rosdahl [Sun, 4 Feb 2018 09:47:06 +0000 (10:47 +0100)] 
Use strftime instead of obsolete asctime function

7 years agoFix most warnings from cppcheck 1.72
Joel Rosdahl [Sun, 4 Feb 2018 09:40:04 +0000 (10:40 +0100)] 
Fix most warnings from cppcheck 1.72

7 years agoChange “improvements” to “enhancements” in NEWS.txt
Joel Rosdahl [Sun, 4 Feb 2018 09:33:54 +0000 (10:33 +0100)] 
Change “improvements” to “enhancements” in NEWS.txt

Every change is hopefully an improvement.

7 years agoFix use-after-free error in 316b966b
Joel Rosdahl [Sat, 3 Feb 2018 21:56:11 +0000 (22:56 +0100)] 
Fix use-after-free error in 316b966b

7 years agoHash host compilers invoked by nvcc
Joel Rosdahl [Sat, 3 Feb 2018 20:16:26 +0000 (21:16 +0100)] 
Hash host compilers invoked by nvcc

See #145.

7 years agoIntroduce and use ARRAY_SIZE macro
Joel Rosdahl [Sat, 3 Feb 2018 09:42:22 +0000 (10:42 +0100)] 
Introduce and use ARRAY_SIZE macro

7 years agoHash '-ccbin' argument
Sam Gross [Tue, 1 Nov 2016 17:45:26 +0000 (10:45 -0700)] 
Hash '-ccbin' argument

7 years agounittest: Pass errmsg to CHECKM when available
Joel Rosdahl [Wed, 31 Jan 2018 21:15:45 +0000 (22:15 +0100)] 
unittest: Pass errmsg to CHECKM when available

From PR #169.

7 years agoUpdate config.guess and config.sub to modern versions
Joel Rosdahl [Wed, 31 Jan 2018 21:00:46 +0000 (22:00 +0100)] 
Update config.guess and config.sub to modern versions

As suggested in PR #169.

7 years agoOnly pass implicit -MQ to preprocessor if needed
Joel Rosdahl [Tue, 30 Jan 2018 21:38:29 +0000 (22:38 +0100)] 
Only pass implicit -MQ to preprocessor if needed

Fixes #209.

7 years agoUpdate NEWS
Joel Rosdahl [Tue, 30 Jan 2018 21:13:32 +0000 (22:13 +0100)] 
Update NEWS

7 years agotest: Add and fix cpp1 suite
Joel Rosdahl [Tue, 30 Jan 2018 21:07:52 +0000 (22:07 +0100)] 
test: Add and fix cpp1 suite

I messed up when adapting Anders's work in f58741b5 to the new test
layout.

7 years agoUpdate NEWS
Joel Rosdahl [Tue, 30 Jan 2018 20:55:17 +0000 (21:55 +0100)] 
Update NEWS

7 years agoImprove docs and clean up
Joel Rosdahl [Tue, 30 Jan 2018 20:51:17 +0000 (21:51 +0100)] 
Improve docs and clean up

7 years agoPass the cpp1 flags more selectively
Anders F Björklund [Mon, 26 Jun 2017 20:51:17 +0000 (22:51 +0200)] 
Pass the cpp1 flags more selectively

The -fdirectives-only flag is needed for *both* cpp and cc/c++,
but the -frewrite-includes is only needed for cpp (not cc/c++).

Also make it easier to follow along in the gcc manual by passing
-fpreprocess explicitly, just like we pass the language to clang.

7 years agoAdd test case for directives-only/rewrite-includes
Anders F Björklund [Sun, 25 Jun 2017 19:49:15 +0000 (21:49 +0200)] 
Add test case for directives-only/rewrite-includes

Use run_second_cpp = false (also known sometimes as "cpp1"),
but instruct the preprocessor to only handle include directives.

Make sure that any headers are still processed, and that both
the #define and -D work as usual (with regular preprocessing).

7 years agoHandle semi-preprocessed source code with cpp1
Anders F Björklund [Sun, 25 Jun 2017 18:41:24 +0000 (20:41 +0200)] 
Handle semi-preprocessed source code with cpp1

When using gcc -fdirectives-only or clang -frewrite-includes,
we still need to pass preprocessor arguments to the compiler.

Also make sure to set the language for clang (but not for gcc),
since the file no longer contains regular preprocessed source.

7 years agoClean up
Joel Rosdahl [Tue, 30 Jan 2018 20:36:19 +0000 (21:36 +0100)] 
Clean up

7 years agoFail if boolean env vars are set with common negative strings
Mostyn Bramley-Moore [Fri, 23 Jun 2017 18:20:54 +0000 (20:20 +0200)] 
Fail if boolean env vars are set with common negative strings

Boolean environment variables have strange semantics: if the variable
is set then the configuration setting is considered "true".  This means
users can easily be mistaken that eg CCACHE_DISABLE=false means that
the "disable" setting is set to false.

To avoid too much backwards-incompatibility, we now exit with an error if
some common negative-sounding (case-insensitive) values:
"0", "false", "disable", "no".

All other values (including the empty string) are still considered to mean
"true".

Resolves https://github.com/ccache/ccache/issues/182

7 years agotest: Rearrange files into test and unittest directories
Joel Rosdahl [Mon, 29 Jan 2018 19:57:18 +0000 (20:57 +0100)] 
test: Rearrange files into test and unittest directories

* The unit tests formerly located in the test directory have been moved
  to the unittest directory.
* The integration test suite test.sh has been made a bash script and
  renamed to test/run. Its test suites are located in test/suites.

7 years agoPrefer bash, when running test.sh script
Anders F Björklund [Fri, 26 Jan 2018 18:12:57 +0000 (19:12 +0100)] 
Prefer bash, when running test.sh script

Look for bash, to make it possible to run "make test"
on platforms where it is not the /bin/sh implementation.

It is possible to build ccache without it, when only
running the limited unit tests (with "make quicktest").

7 years agoMerge branch '3.3-maint'
Joel Rosdahl [Sun, 28 Jan 2018 15:24:14 +0000 (16:24 +0100)] 
Merge branch '3.3-maint'

* 3.3-maint:
  Prepare for v3.3.6

7 years agoPrepare for v3.3.6 3.3-maint v3.3.6
Joel Rosdahl [Sun, 28 Jan 2018 15:22:29 +0000 (16:22 +0100)] 
Prepare for v3.3.6

7 years agoTweak code style and comments
Joel Rosdahl [Sun, 28 Jan 2018 15:20:30 +0000 (16:20 +0100)] 
Tweak code style and comments

7 years agoMerge branch '3.3-maint'
Joel Rosdahl [Sun, 28 Jan 2018 15:12:47 +0000 (16:12 +0100)] 
Merge branch '3.3-maint'

* 3.3-maint:
  Update NEWS
  test: Verify that UNCACHED_ERR_FD works
  Only write hash debug output if there is any data
  Fix broken UNCACHED_ERR_FD

7 years agoUpdate NEWS
Joel Rosdahl [Sun, 28 Jan 2018 15:08:31 +0000 (16:08 +0100)] 
Update NEWS

7 years agotest: Verify that UNCACHED_ERR_FD works
Joel Rosdahl [Sun, 28 Jan 2018 15:06:36 +0000 (16:06 +0100)] 
test: Verify that UNCACHED_ERR_FD works

7 years agoOnly write hash debug output if there is any data
Joel Rosdahl [Sun, 28 Jan 2018 15:05:07 +0000 (16:05 +0100)] 
Only write hash debug output if there is any data

7 years agoFix broken UNCACHED_ERR_FD
Luboš Luňák [Fri, 26 Jan 2018 07:47:30 +0000 (08:47 +0100)] 
Fix broken UNCACHED_ERR_FD

It shouldn't be closed on exec since that's exactly the point, to leak
it to whatever ccache calls.

7 years agotest: Fix nvcc tests when using compiler with options
Joel Rosdahl [Sat, 27 Jan 2018 22:01:07 +0000 (23:01 +0100)] 
test: Fix nvcc tests when using compiler with options

7 years agotest: Remove superfluous blank lines
Joel Rosdahl [Sat, 27 Jan 2018 22:00:01 +0000 (23:00 +0100)] 
test: Remove superfluous blank lines

7 years agotest: Split into one file per suite
Joel Rosdahl [Sat, 27 Jan 2018 21:18:37 +0000 (22:18 +0100)] 
test: Split into one file per suite

The test.sh file has simply grown unpleasantly large, so it's time to
split it up. Some suites still refer to stuff defined in earlier suites,
but we'll have to live with that for now.

7 years agoUpdate NEWS
Joel Rosdahl [Sat, 27 Jan 2018 21:02:25 +0000 (22:02 +0100)] 
Update NEWS

7 years agoClean up code related to CUDA/nvcc
Joel Rosdahl [Sat, 27 Jan 2018 20:57:22 +0000 (21:57 +0100)] 
Clean up code related to CUDA/nvcc

Remove tabs from test.sh, use lowercase names for local variables and
other minor fixes.

7 years agotest: Fix nvcc_ldir tests when gcc is a masquerading ccache
Joel Rosdahl [Sat, 27 Jan 2018 20:25:19 +0000 (21:25 +0100)] 
test: Fix nvcc_ldir tests when gcc is a masquerading ccache

7 years agoBug fixes and tests for nvcc
Clemens Rabe [Wed, 23 Aug 2017 07:33:23 +0000 (09:33 +0200)] 
Bug fixes and tests for nvcc

Feature: Added cuda compiler in separate travis job and implemented
         tests for nvcc.

Feature: Added support for nvcc compiler options --compiler-bindir/-ccbin,
         --output-directory/-odir and --libdevice-directory/-ldir.
         Added tests for these options in test.sh.

Bug fix: Original patch had a statement to avoid using the preprocessed
         input files for nvcc when run_second_cpp is false. Otherwise,
         when a build is necessary and the preprocessed output was used,
         nvcc results with a compiler error. The patch simply ensures
         run_second_cpp is always set to true for the cuda compiler.

Bug fix: The -optf and -odir options are only accepted for nvcc. For other
         compilers, they behave like '-o ptf' resp. '-o dir'.
         A test was added to check this behaviour.

7 years agotest: Fix failure in gcc pch suite when using compiler with options
Joel Rosdahl [Sat, 27 Jan 2018 14:26:15 +0000 (15:26 +0100)] 
test: Fix failure in gcc pch suite when using compiler with options

Need to remember any extra compiler options in REAL_COMPILER as well.

7 years agotest: Find and use real compiler
Joel Rosdahl [Mon, 22 Jan 2018 20:59:31 +0000 (21:59 +0100)] 
test: Find and use real compiler

The real compiler is now found in the same way as ccache itself does it,
so we no longer have to rely on the uncached_compile hack.

7 years agotest: Check that dependency file contains the correct object name
Joel Rosdahl [Mon, 22 Jan 2018 09:56:06 +0000 (10:56 +0100)] 
test: Check that dependency file contains the correct object name

7 years agoRefactor and clean up code for copying results to/from the cache
Joel Rosdahl [Sun, 21 Jan 2018 21:17:24 +0000 (22:17 +0100)] 
Refactor and clean up code for copying results to/from the cache

Lots of cruft and copy pasta has collected during the years.

* It's enough to let get_file_from_cache detect missing files in the
  cache; no need to check before.
* Made the order of the handling of the different file types consistent
  in various places.
* Removed the tmp_cov, tmp_su and tmp_dwo variables. I cannot
  see why they just aren't redundant since the corresponding output_*
  variables already exist with the same value. Except for the "GCC has
  some funny rule" part, but that seems bogus anyway since tmp_* and
  output_* must be equal for things to work. Let's just ignore it for
  now.
* Removed the support for generating placeholders for .cov and .su files
  if the compiler doesn't create them. Modern compilers always create
  them, and I want to reduce code complexity.

7 years agoImprove file size/number counters for overwritten files
Joel Rosdahl [Sun, 21 Jan 2018 08:34:51 +0000 (09:34 +0100)] 
Improve file size/number counters for overwritten files

When ccache overwrites a cached file, the counters are still increased
as if a new file was stored in the cache, for instance when recaching.

This is now fixed by checking if a cached file exists before storing the
cached file and update file size/number counters with the correct
size/count delta.

7 years agoMerge branch '3.3-maint'
Joel Rosdahl [Sun, 21 Jan 2018 09:53:10 +0000 (10:53 +0100)] 
Merge branch '3.3-maint'

* 3.3-maint:
  doc: Improve instructions on how to compile in different directories
  Split .incbin directive in ccache source code to enable cache hits

7 years agodoc: Improve instructions on how to compile in different directories
Joel Rosdahl [Sun, 21 Jan 2018 08:13:45 +0000 (09:13 +0100)] 
doc: Improve instructions on how to compile in different directories

7 years agoSplit .incbin directive in ccache source code to enable cache hits
Joel Rosdahl [Sun, 21 Jan 2018 07:54:17 +0000 (08:54 +0100)] 
Split .incbin directive in ccache source code to enable cache hits

7 years agoMerge branch '3.3-maint'
Joel Rosdahl [Sat, 13 Jan 2018 18:38:26 +0000 (19:38 +0100)] 
Merge branch '3.3-maint'

* 3.3-maint:
  Prepare for v3.3.5
  doc: Tweak automatic cleanup description

7 years agoPrepare for v3.3.5 v3.3.5
Joel Rosdahl [Sat, 13 Jan 2018 18:34:47 +0000 (19:34 +0100)] 
Prepare for v3.3.5

7 years agodoc: Tweak automatic cleanup description
Joel Rosdahl [Sat, 13 Jan 2018 16:43:34 +0000 (17:43 +0100)] 
doc: Tweak automatic cleanup description

7 years agoFix code style
Joel Rosdahl [Thu, 11 Jan 2018 21:33:50 +0000 (22:33 +0100)] 
Fix code style

7 years agoFix compilation with MinGW32
Orgad Shaneh [Wed, 24 May 2017 12:31:23 +0000 (15:31 +0300)] 
Fix compilation with MinGW32