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, 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 [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.
Joel Rosdahl [Wed, 27 Jul 2016 18:49:00 +0000 (20:49 +0200)]
Let run_second_cpp default to true
ccache has since day 1 (OK, actually day 13: 5f6f5010) relied on the
fact that GCC and similar enough compilers are able to compile their own
preprocessed output with the same outcome as if they compiled the real
source code directly.
However, newer versions of GCC no longer quite work this way since they
perform an increasing amount of diagnostics analysis only if the source
code is compiled directly. The same goes for Clang. It's impossible for
ccache to work around this changed behavior in a good way.
Joel Rosdahl [Mon, 25 Jul 2016 15:58:37 +0000 (17:58 +0200)]
test: Various improvements and cleanups that were long needed
* Made all test cases isolated, not reusing test state from previous
tests.
* Introduced per-suite detection whether suite should be run or skipped.
* Only run base_tests with and without CCACHE_CPP2.
* Moved CCACHE_HARDLINK, CCACHE_NLEVELS, CCACHE_EXTRAFILES,
CCACHE_IGNOREHEADERS, CCACHE_PREFIX, ccache symlinks and "buggy CPP"
tests into base_tests instead of having test suites of their own.
* Split conditional tests (depending on compiler and/or OS) into
separate test suites.
* Removed -fprofile-generate and -fprofile-use tests since they don't
test any functionality.
* Made various cleanups that were long needed.
Joel Rosdahl [Sat, 23 Jul 2016 20:44:12 +0000 (22:44 +0200)]
Disable i586-mingw32msvc build for now
The i586-mingw32msvc build fails since e527cccb because
i586-mingw32msvc-gcc is based on GCC 4.2 which apparently is too old to
have good enough C99 support.
More specifically, it doesn't build since the compiler emits a "C99
inline functions are not supported; using GNU89" warning, and we use
-Werror.
Joel Rosdahl [Wed, 20 Jul 2016 15:54:46 +0000 (17:54 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Prepare for v3.2.7
Update NEWS
Make sure to hash the trailing quote when skipping
Add test for certain gcc compilers with buggy cpp
Make calculate_object_hash handle argument-less -B etc. correctly
Anders Björklund [Thu, 14 Jul 2016 21:22:25 +0000 (23:22 +0200)]
Make sure to hash the trailing quote when skipping
Turns out that 3.2-maint hashes preprocessor output a bit differently,
so the workaround for skipping certain lines was broken in backport.
When skipping the "extra line", the trailing quotes were missing from
the output causing the hash to be different from the normal output.