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
Joel Rosdahl [Wed, 28 Sep 2016 20:17:16 +0000 (22:17 +0200)]
Disable direct mode for "-Wp," with multiple preprocessor options
This fixes a regression in ccache 3.2.8/3.3.1 (commit 026ba6b9): ccache
could get confused when using the compiler option -Wp, to pass multiple
options to the preprocessor, resulting in missing dependency files from
direct mode cache hits.
Joel Rosdahl [Tue, 27 Sep 2016 21:20:36 +0000 (23:20 +0200)]
Hash source path when generating dependencies to avoid false positive
5908e656ef2a6493b42159acff4b1f490016d055 introduced a regression: If a
source file is compiled in directory A and an identical source file in
directory B results in a preprocessed hit, then the dependency file from
the first compilation will be overwritten by the second compilation.
Since the source path is part of the dependency file, an incorrect
dependency file will be retrieved from the cache when recompiling the
source in directory A.
The solution is to include the source path part in the object hash if a
dependency file is being generated.
Joel Rosdahl [Tue, 27 Sep 2016 21:20:36 +0000 (23:20 +0200)]
Hash source path when generating dependencies to avoid false positive
5908e656ef2a6493b42159acff4b1f490016d055 introduced a regression: If a
source file is compiled in directory A and an identical source file in
directory B results in a preprocessed hit, then the dependency file from
the first compilation will be overwritten by the second compilation.
Since the source path is part of the dependency file, an incorrect
dependency file will be retrieved from the cache when recompiling the
source in directory A.
The solution is to include the source path part in the object hash if a
dependency file is being generated.
Joel Rosdahl [Wed, 7 Sep 2016 18:46:18 +0000 (20:46 +0200)]
Only pass -Wp,-MT and similar to the preprocessor
This fixes an issue when compiler option -Wp,-MT,path is used instead of
-MT path (and similar for -MF, -MP and -MQ) and run_second_cpp
(CCACHE_CPP2) is enabled.
Anders Björklund [Thu, 21 Jul 2016 12:08:54 +0000 (14:08 +0200)]
Including trailing quote and cpp flags in the hash
When looking for which headers are system headers ("3")
in the commit 219783844c63d37c26f771c1471f3fe2943f9a88,
we skipped hashing the quote and flags... Restore that.
Shouldn't make any major difference, but changes the hash.