Matthias Kretz [Fri, 30 Oct 2015 15:53:37 +0000 (16:53 +0100)]
Pass -stdlib= only to preprocessor
Clang warns about an unused -stdlib=libc++ argument if the argument is
passed to the second clang invocation. The -stdlib= argument is only
necessary on preprocessing (to set the system include paths) and on
linking (which is not cached anyway)
Joel Rosdahl [Sun, 13 Sep 2015 12:37:06 +0000 (14:37 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Use correct compression level when copying into the cache
Update NEWS
Minor improvements to Windows support
Revert "Recognize concatenated form of some compiler options"
Recognize concatenated form of some compiler options
Joel Rosdahl [Sun, 30 Aug 2015 19:22:48 +0000 (21:22 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Include strings.h for strcasecmp
Remove unnecessary extra_cppflags, extra_ldflags and all_ldflags variables
Improve signal handling
Wait for compiler subprocess to exit before exiting from a signal
Make conversion-to-bool explicit to avoid warnings on legacy systems
Fix regression in recent change related to zlib in nonstandard location
Joel Rosdahl [Sat, 29 Aug 2015 16:09:37 +0000 (18:09 +0200)]
Improve signal handling
* Block signals while manipulating data read by the signal handler.
* If ccache receives SIGTERM, kill compiler as well. (Other signals like
SIGINT are sent to the whole process group.)
* Die appropriately at the end of the signal handler by resending the
signal instead of exiting.
Joel Rosdahl [Mon, 17 Aug 2015 17:05:14 +0000 (19:05 +0200)]
Fix regression in recent change related to zlib in nonstandard location
To allow for specifying a -L flag in LDFLAGS and have it take effect for
-lz, 0220de9c8ebfb18caae2ac1aa163d060e98ceade put -lz in extra_libs
instead of extra_ldflags. However, extra_libs is supposed to contain
paths to libraries which are prerequisites of the ccache link rule, and
some older versions of make got confused by seeing -lz as a
prerequisite.
Joel Rosdahl [Sun, 16 Aug 2015 12:14:46 +0000 (14:14 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Prepare for v3.2.3
Bail out on --save-temps, an alias for -save-temps
Use correct key for "file info indexes" in --dump-manifest output
Exit properly from exit handler
Joel Rosdahl [Sun, 9 Aug 2015 20:07:11 +0000 (22:07 +0200)]
Exit properly from exit handler
This fixes a problem where two SIGINT (Ctrl+C) signals were needed to
terminate an ongoing compilation. (The first SIGINT terminated the
compiler which exited with non-zero status, which ccache then went on
interpreting as an ordinary failed compilation, leading to rerunning the
compiler via failed().)
Joel Rosdahl [Wed, 5 Aug 2015 15:48:00 +0000 (17:48 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
test: Make subst_env_in_string not depend on existing environment
Update source code style according to uncrustify
Add uncrustify config and make rule
Source code style tweaks
Minor tweaking to comments
Only log "Disabling direct mode" once when failing to read include file
Joel Rosdahl [Mon, 27 Apr 2015 19:52:28 +0000 (21:52 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Mention next unreleased version in NEWS
Remove signal-unsafe code from signal handler
Fix build error when compiling ccache with recent clang versions
Joel Rosdahl [Sun, 19 Apr 2015 11:38:41 +0000 (13:38 +0200)]
Merge branch '3.2-maint'
* 3.2-maint:
Update NEWS
Correct doc string of stats_update_size
Minor style tweaks
Fix minor memory leaks
Add support for coverage (compiling for gcov)
Store the coverage notes (.gcno file) in the cache, next to the object.
If called on a file without actual code, like a header, then generate an
empty file in the cache to be able to separate this case from file missing.
Newer versions of gcc will generate a small file instead of not generating.
In the object file generated with -fprofile-arcs, the runtime output file
for the coverage data (.gcda file) is created from the output filename.
Make sure to hash this path to avoid cache hits with another absolute path.
Also make sure to use the source file path, since this is in the notes.
Joel Rosdahl [Thu, 19 Mar 2015 21:02:20 +0000 (22:02 +0100)]
Merge branch '3.2-maint'
* 3.2-maint:
Introduce logging wrappers for stat/lstat/fstat functions
Harden logging, perror() replaced with fatal(), unlink() failure recorded
Always check the result of stat() system calls
Log failure of opening file to hash
Jiang Jiang [Tue, 2 Dec 2014 16:23:16 +0000 (17:23 +0100)]
Support syntax CCACHE_COMPILERCHECK=string:<value>
This can be faster than running a command directly, because the
command to run might just produce the same result for every ccache
invocation. By reading it from config file or environment variable
we can just run that command once and store the result in the string
following "string:" and reusing it.
For example when we want to use clang revision for clang built from
SVN trunk, we can just call clang --version once and store the
revision number like:
Joel Rosdahl [Sat, 7 Mar 2015 16:39:54 +0000 (17:39 +0100)]
Avoid unnecessary copy of object file on cache miss
As noted by Chiaki Ishikawa, ccache performs an unnecessary copy of the
object file from the cache on a cache miss. This was an refactoring
oversight in 18a645451194becb832bd1ff4fee1c1e9f3d0dc5.
Joel Rosdahl [Fri, 20 Feb 2015 19:32:33 +0000 (20:32 +0100)]
Fix comment scanning bug in hash_source_code_string
hash_source_code_string tries to ignore __DATE__/__TIME strings in
comments, but fails to parse code that contains character literal of a
double quote. This could result in false cache hits when the source code
happens to contain '"' followed by " /*" or " //" (with variations).
The fix is to do like it's already done in ccache 3.2: Don't try to be
overly clever about __DATE__/__TIME__, just check for those strings
anywhere in the source code string.