Joel Rosdahl [Thu, 11 Jan 2018 20:08:01 +0000 (21:08 +0100)]
Merge branch '3.3-maint'
* 3.3-maint:
Update NEWS
Don't skip compiler argument following AFFECTS_CPP without TAKES_ARG
Clean up
Clean up redundant expression
-fdebug-prefix-map is supported in clang 3.8 and newer
Fix leaked file descriptor
Clang emits warnings for unused linker arguments, respect that!
doc: Improve markup
Add some fallthrough comments to work around GCC compiler warnings
Edward Z. Yang [Fri, 30 Jun 2017 14:35:29 +0000 (07:35 -0700)]
Clang emits warnings for unused linker arguments, respect that!
If ccache concludes the invocation with/without linker arguments
is the same as before, then it may show/fail to show a warning
when it should. I know we're not supposed to rely on the
is clang check, but this solves it in normal cases.
Joel Rosdahl [Wed, 10 Jan 2018 20:10:45 +0000 (21:10 +0100)]
Merge branch '3.3-maint'
* 3.3-maint:
Document how automatic cleanup works
Make ccache -c/--cleanup not take limit_multiple into account
test: Fix printing of failure reason with glob characters
Fix grammar in cleanup_* function names
test: Unset all CCACHE variables in environment
cleanup: Improve logging
test: Check more cases of path normalization
Don't overwrite cached .d file with a version with absolute paths
test: Fix verbose printing of test case name with space
Update NEWS
Don't use cache when building precompiled header with changed deps
Always use include DEFAULT_SLOPPINESS when overriding CCACHE_SLOPPINESS
Joel Rosdahl [Sat, 6 Jan 2018 14:41:13 +0000 (15:41 +0100)]
Make ccache -c/--cleanup not take limit_multiple into account
Now "ccache -c/--cleanup" will trim the cache to the configured max
limits instead of 80% (limit_multiple) of the max limits. This feels
like a more intuitive behavior, and it also makes it behave like
documented.
Tor Arne Vestbø [Thu, 15 Jun 2017 12:40:16 +0000 (14:40 +0200)]
Don't use cache when building precompiled header with changed deps
If one of the included files in a precompiled header is touched,
changing only its mtime, clang will produce a fatal error when the
precompiled header is then used:
file 'foo.h' has been modified since the precompiled header 'foo.pch' was built
We need to take this into account when producing precompiled headers,
so that we don't pick out stale objects from the cache. This works
fine for direct mode, but in preprocess mode we don't have enough
information to decide if the object is still valid, so we skip the
cache entirely in that mode.
Joel Rosdahl [Thu, 15 Jun 2017 18:32:18 +0000 (20:32 +0200)]
Merge branch '3.3-maint'
* 3.3-maint:
Update log message and docs when using SLOPPY_FILE_STAT_MATCHES
Tweak comment
Add comment about why SLOPPY_INCLUDE_FILE_[CM]TIME compares using >=t
Joel Rosdahl [Sat, 25 Mar 2017 20:24:57 +0000 (21:24 +0100)]
Merge branch '3.3-maint'
* 3.3-maint:
Update NEWS
Add test for directory in ignore_headers_in_manifest
Fix DIR_DELIM_CH for win32 and non-win32 platforms, values were mixed up
Update NEWS
Tweak source code format
Support using multiple -fdebug-prefix-map
Fixed the check for empty object file vs diagnostics
Removed time_of_compilation check wrt SLOPPY_FILE_STAT_MATCHES
Revert "Better parsing of g* Options, and only use last argument"
Test that the order of debug options is kept
Alexey Tourbin [Sat, 18 Feb 2017 13:29:53 +0000 (16:29 +0300)]
Fixed the check for empty object file vs diagnostics
The test for diagnostic file currently interferes with the check for
empty object file. Since the check for diagnostic file is much more
similar to the check for dependency file, I put it there.
The whole code seems to be a thinko. For a hit, neither ctime
nor mtime should be greater than or equal to time_of_compilation.
The code only seems to work because time_of_compilation is 0
at this stage (i.e. has not been initialized).
While at it, I also introduce an optimization: when sizes do
not match, it's a good chance to bail out early; there is no
point in further hashing the file.
The feature introduced in #92 changes the order of debug options,
leading to bugs like #149. It would be possible to add more logic to
handle special cases like -gsplit-dwarf, but for now I'll just back out
the patch and keep ccache ignorant about debug options.
ccache.c:1233:7: warning: Null pointer passed as an argument to a 'nonnull' parameter
ccache.c:1274:7: warning: Null pointer passed as an argument to a 'nonnull' parameter
ccache.c:1291:7: warning: Null pointer passed as an argument to a 'nonnull' parameter
ccache.c:1893:2: warning: Use of memory after it is freed
Joel Rosdahl [Sun, 12 Feb 2017 14:00:43 +0000 (15:00 +0100)]
Merge branch '3.3-maint'
* 3.3-maint:
Run test for undefined behaviour with Travis
Undefined: avoid shift warning in manifest
Undefined: avoid shift warning in murmurhash
Undefined: avoid null warning in tmp_unlink
Include feature_macros earlier in configure.ac
Document the different cache statistics counters
Use correct statistics counter for -optf/--options-file failure
Update NEWS
Include names of include files in the hash again
Joel Rosdahl [Sun, 5 Feb 2017 20:51:28 +0000 (21:51 +0100)]
Include names of include files in the hash again
This is essentially a revert of 5908e656 and 9cffdc65 (a partial fix of
the problem). The idea of pull request #88 ("preprocessor mode: enable
using identical header in different paths") did not work out well in
practice since it broke handling of dependency files. See the new "-MMD
for different ..." test cases which fail without the revert.
Joel Rosdahl [Wed, 26 Oct 2016 21:34:19 +0000 (23:34 +0200)]
Merge branch '3.3-maint'
* 3.3-maint:
Prepare for v3.3.3
Bail out on usage of .incbin` assembler directives
Rename STATS_UNSUPPORTED to STATS_UNSUPPORTED_OPTION
Compute width of stats messages instead of hardcoding
Reformat stats_info array