From 64fc20ee97bac3f055b8b1a8f116af95ad103c43 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 6 Jan 2003 01:20:54 +0100 Subject: [PATCH] - update version to 2.0 - added CCACHE_RECACHE option (suggestion from Ismael Orenstein ) --- ccache.1 | 5 +++++ ccache.c | 10 +++++++++- ccache.h | 2 +- ccache.yo | 4 ++++ web/ccache-man.html | 3 +++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ccache.1 b/ccache.1 index 00b9c6b..aaef0f4 100644 --- a/ccache.1 +++ b/ccache.1 @@ -169,6 +169,11 @@ instead\&. The main reason for setting this option is to avoid the update of the modification time on object files that are the result of the same compilation in a different directory\&. .IP +.IP "\fBCCACHE_RECACHE\fP" +This forces ccache to not use any cached +results, even if it finds them\&. New results are still cached, but +existing cache entries are ignored\&. +.IP .IP "\fBCCACHE_UNIFY\fP" If you set the environment variable CCACHE_UNIFY then ccache will use the C/C++ unifier when hashing the pre-processor diff --git a/ccache.c b/ccache.c index 542b72e..312da92 100644 --- a/ccache.c +++ b/ccache.c @@ -384,6 +384,14 @@ static void from_cache(int first) return; } + /* the user might be disabling cache hits */ + if (first && getenv("CCACHE_RECACHE")) { + close(fd_stderr); + unlink(stderr_file); + free(stderr_file); + return; + } + utime(stderr_file, NULL); if (strcmp(output_file, "/dev/null") == 0) { @@ -630,7 +638,7 @@ static void process_args(int argc, char **argv) { const char *opts[] = {"-I", "-Iinclude", "-imacros", "-iprefix", "-iwithprefix", "-iwithprefixbefore", - "-L", "-D", "-U", "-x", "-MF", "-MT", + "-L", "-D", "-U", "-x", "-MF", "-MT", "-MQ", "-isystem", "-aux-info", "--param", "-A", "-Xlinker", "-u", NULL}; diff --git a/ccache.h b/ccache.h index 5a4d079..bcf3fdd 100644 --- a/ccache.h +++ b/ccache.h @@ -1,4 +1,4 @@ -#define CCACHE_VERSION "1.9" +#define CCACHE_VERSION "2.0" #include "config.h" diff --git a/ccache.yo b/ccache.yo index 87461df..bb383d7 100644 --- a/ccache.yo +++ b/ccache.yo @@ -144,6 +144,10 @@ instead. The main reason for setting this option is to avoid the update of the modification time on object files that are the result of the same compilation in a different directory. +dit(bf(CCACHE_RECACHE)) This forces ccache to not use any cached +results, even if it finds them. New results are still cached, but +existing cache entries are ignored. + dit(bf(CCACHE_UNIFY)) If you set the environment variable CCACHE_UNIFY then ccache will use the C/C++ unifier when hashing the pre-processor output if -g is not used in the compile. The unifier is slower than a diff --git a/web/ccache-man.html b/web/ccache-man.html index 1c2a938..007fe71 100644 --- a/web/ccache-man.html +++ b/web/ccache-man.html @@ -137,6 +137,9 @@ directory when creating the compiler output and will do a file copy instead. The main reason for setting this option is to avoid the update of the modification time on object files that are the result of the same compilation in a different directory. +

CCACHE_RECACHE
This forces ccache to not use any cached +results, even if it finds them. New results are still cached, but +existing cache entries are ignored.

CCACHE_UNIFY
If you set the environment variable CCACHE_UNIFY then ccache will use the C/C++ unifier when hashing the pre-processor output if -g is not used in the compile. The unifier is slower than a