Commit Graph

173 Commits

Author SHA1 Message Date
Joel Rosdahl
1685c08ec6 Remove unnecessary initialization of a static variable 2010-02-27 23:37:19 +01:00
Joel Rosdahl
70264c3113 Portability: Include sys/stat.h and fcntl.h to get O_RDONLY and friends 2010-02-27 23:32:15 +01:00
Joel Rosdahl
a1e6035722 Include sys/types.h in an attempt to please AIX 2010-02-27 23:18:59 +01:00
Joel Rosdahl
9fbe4e4578 Simplify and correct calculation of default dependency file name 2010-02-27 22:53:04 +01:00
Joel Rosdahl
f447ee7c14 Remove unnecessary NULL check 2010-02-27 22:22:03 +01:00
Joel Rosdahl
2b2f5ddcd8 Improve display of max size display values 2010-02-27 14:01:14 +01:00
Joel Rosdahl
dd9f6cd234 Bail out on too hard compiler option -save-temps 2010-02-27 12:36:41 +01:00
Joel Rosdahl
2c0be1c61d Sort unsupported compiler options 2010-02-27 12:36:41 +01:00
Joel Rosdahl
e485956929 Improve detection of program name being MYNAME 2010-02-27 12:36:41 +01:00
Joel Rosdahl
c63aad8807 Introduce string constants for usage and version texts 2010-02-27 12:36:35 +01:00
Joel Rosdahl
b4c372f829 Fix potential use of NULL cache_dir 2010-02-27 10:06:55 +01:00
Joel Rosdahl
e374b1b1d0 Improve log message 2010-02-25 08:19:51 +01:00
Joel Rosdahl
3eb87a8bbf Improve log messages 2010-02-24 21:39:35 +01:00
Joel Rosdahl
815d96dd6a Let cc_log and fatal add a newline character to the message 2010-02-24 21:25:32 +01:00
Joel Rosdahl
4af546d3dc Merge CCACHE_HASH_COMPILER/CCACHE_NOHASH_SIZE_MTIME into CCACHE_COMPILERCHECK 2010-02-22 22:40:50 +01:00
Joel Rosdahl
fb360d9e10 Add missing newlines to cc_logs 2010-02-22 21:27:31 +01:00
Joel Rosdahl
2b215563e0 Merge branch 'cleanup' of git://github.com/krajaratnam/ccache
* 'cleanup' of git://github.com/krajaratnam/ccache:
  ccache.c: mark extensions array as const
  cache.c: mark a few variables as static
2010-02-22 08:39:24 +01:00
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