206 Commits

Author SHA1 Message Date
Joel Rosdahl
131111cd58 Handle missing or empty object file from compiler properly 2010-02-22 08:36:40 +01:00
Joel Rosdahl
196baceaef Log command-line prefix 2010-02-22 08:34:56 +01:00
Joel Rosdahl
694fdd6775 Add .o suffix to stored object files for consistency 2010-02-21 21:14:51 +01:00
Joel Rosdahl
741bb5587f Add comments about the stats files 2010-02-21 20:58:58 +01:00
Kovarththanan Rajaratnam
b88b4feb49 ccache.c: mark extensions array as const 2010-02-21 19:32:25 +01:00
Kovarththanan Rajaratnam
61703fee0b cache.c: mark a few variables as static 2010-02-21 19:31:47 +01:00
Joel Rosdahl
7ecd43080c Improve naming of global variables
Now, the output_* variables contain paths to files to be created by the
compiler and the cached_* variables contain paths to files in the cache
directory.
2010-02-21 18:20:53 +01:00
Joel Rosdahl
5ea294ef76 Force new hash sums
All hash sums will from now on be different from those calculated by ccache
2.4, instead of only hash sums for compressed files. This makes hash sums for
compressed and uncompressed files equal again, which reopens for conversion
between compressed and uncompressed files, should the need arise.
2010-02-21 18:18:03 +01:00
Clemens Rabe
3eaee4c2a7 Bail out on profiling flags
GCCs options -fprofile-generate and -fprofile-use are used for profile guided
optimization. It depends on the ability to locate the profile data files
(.gcda) after running the executable with the training data. However, ccache
prevents the compiler from finding the correct profile data file. Therefore the
following patch disables the caching when one of the -fprofile-generate
-fprofile-use flags is found.
2010-02-20 10:19:33 +01:00
Joel Rosdahl
4a49cf6661 Expand license notice in the --version text 2010-02-17 22:47:50 +01:00
Joel Rosdahl
976e256525 Update copyright notices 2010-02-17 21:03:29 +01:00
Joel Rosdahl
ecf85fc492 Remove standard includes from ccache.h 2010-02-17 21:03:27 +01:00
Joel Rosdahl
d93529548a Move utimes/utime into an update_mtime function 2010-02-17 20:10:00 +01:00
Joel Rosdahl
145462baa9 Use our own getopt_long 2010-02-17 20:10:00 +01:00
Joel Rosdahl
fd0cd87c6b Remove stderr file from the preprocessor when we get a preprocessed cache hit 2010-02-12 21:52:28 +01:00
Joel Rosdahl
b554a73e69 Handle empty arguments correctly 2010-01-25 21:33:09 +01:00
Joel Rosdahl
df7d2dd5fa Fix typo 2010-01-25 21:33:08 +01:00
Joel Rosdahl
ce0dece114 Clarify cache size limit options' semantics 2010-01-06 22:23:10 +01:00
Joel Rosdahl
6721406549 Bail out on @file_with_options argument 2010-01-06 22:23:10 +01:00
Joel Rosdahl
2872fe872f Improve handling of -imacros, -iprefix and -i*prefix* compiler options 2010-01-06 22:23:10 +01:00
Joel Rosdahl
42273c937f Let compressed files get different hash sums than uncompressed
This is to avoid problems when older ccache versions (without compression
support) access the cache.
2010-01-06 22:23:10 +01:00
Joel Rosdahl
0114296fcb Unify comments when hashing source code to increase hit rate 2010-01-05 18:53:04 +01:00
Joel Rosdahl
9e5eda09c7 Improve error messages 2010-01-05 18:53:03 +01:00
Joel Rosdahl
9bd32895fd Also store preprocessor standard error output in .stderr file
This is needed because we don't run the preprocessor at all in direct mode.
2010-01-05 18:53:03 +01:00
Joel Rosdahl
59eb6b9fc3 Don't create empty stderr files in the cache 2010-01-05 18:53:03 +01:00
Joel Rosdahl
3ebcc3b8c9 Put temporary files in a subdirectory of the cache directory
This is to avoid clobbering the cache directory root with left-over temporary
files.
2010-01-05 18:53:03 +01:00
Joel Rosdahl
63a505fe79 Fix statistics and cache cleanup for files generated by direct mode
The statistics counters "files in cache" and "cache size" now only include
object files. It's not worth the effort to keep track of the .manifest, .d and
.stderr files since the cache size is dominated by the object files, and it's
unlikely that anyone is bothered by du(1) having a different opinion (which
also was the case before anyway). Consequently, the "max file" and "max cache
size" settings now specify thresholds for object files count and size.
2010-01-05 18:53:03 +01:00
Joel Rosdahl
8d121763f2 Handle missing dependency file in cache correctly 2010-01-05 18:53:03 +01:00
Joel Rosdahl
fb61183998 Improve copy_file and move_file functions 2010-01-05 18:53:02 +01:00
Joel Rosdahl
8190792e35 Require zlib 2010-01-05 18:53:02 +01:00
Joel Rosdahl
9e167408cb Correctly handle direct mode hit, missing object file and differing cpp hash 2010-01-05 18:53:02 +01:00
Joel Rosdahl
f40af7cc64 Remove silly log message 2010-01-05 18:53:02 +01:00
Joel Rosdahl
befbba943b Rewrite include directory option arguments into relative to get better hit rate
A secondary effect is that paths in the standard error output produced by the
compiler will be normalized.
2010-01-05 18:53:02 +01:00
Joel Rosdahl
98f23bd8fd Rewrite dependency file path to relative as well 2010-01-05 18:53:02 +01:00
Joel Rosdahl
3e9dda00ab Add support for -Wp,-MD and -Wp,-MMD flags 2010-01-05 18:53:02 +01:00
Joel Rosdahl
f5bb7e4e5a Rewrite absolute paths under CCACHE_BASEDIR to relative 2010-01-05 18:53:02 +01:00
Joel Rosdahl
905f885a10 Don't put duplicate object file entries in the manifest 2010-01-05 18:53:02 +01:00
Joel Rosdahl
ba93474268 Let direct mode create dependency file too 2010-01-05 18:53:02 +01:00
Joel Rosdahl
37739bc9e1 Improve logging 2010-01-05 18:53:02 +01:00
Joel Rosdahl
b80dfc477b Fix bad memory access spotted by Valgrind 2010-01-05 18:53:02 +01:00
Joel Rosdahl
e53af1a618 First working version of the direct mode 2010-01-05 18:53:01 +01:00
Joel Rosdahl
26d779b300 Log fatal messages both to stderr and log file 2010-01-05 18:53:01 +01:00
Joel Rosdahl
9928604eb5 Let hash_* functions take a hash context so that they are reusable 2010-01-05 18:53:01 +01:00
Joel Rosdahl
dca11d321b Remove trailing whitespace 2010-01-05 18:53:01 +01:00
Joel Rosdahl
e289678ff8 Don't hash CCACHE_PREFIX 2010-01-05 18:53:01 +01:00
Joel Rosdahl
cc903b4a54 Fix indentation 2010-01-05 18:53:01 +01:00
Joel Rosdahl
75b02657dc Bail out on --coverage and -fprofile-arcs 2010-01-05 18:53:01 +01:00
William S Fulton
3259ac1e5c Fix GCC 4.3 warnings
See <http://bugs.debian.org/508046>.
2010-01-05 18:53:00 +01:00
Francois Marier
9786fdf1d2 Detect and report permission failure for "ccache -F/-M"
Debian patch 12_cachesize_permissions.diff. See
<http://bugs.debian.org/332527>.
2010-01-05 18:53:00 +01:00
Robin H. Johnson
237bee6615 Use utimes(3) instead of utime(3) to avoid truncating timestamps
See <http://bugs.gentoo.org/136233>.
2010-01-05 18:53:00 +01:00