From 1b322f5fe45adfc02a8f841d149dd826ecb2cb8e Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 28 Apr 2010 21:21:42 +0200 Subject: [PATCH] Don't hash -U in the preprocessor mode --- NEWS.txt | 4 ++++ ccache.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index 03797adfb..e5b3f166c 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -100,6 +100,10 @@ New features and improvements - For debugging purposes, the variable `CCACHE_VERBOSE` may now be set to make ccache print executed commands to standard output. + - The following options are no longer hashed in the preprocessor mode: + `-imacros`, `-iprefix`, `-iwithprefix`, `-iwithprefixbefore`, + `-nostdinc`, `-nostdinc++` and `-U`. + Bug fixes ~~~~~~~~~ diff --git a/ccache.c b/ccache.c index ea25a2778..1cd4cec70 100644 --- a/ccache.c +++ b/ccache.c @@ -863,7 +863,8 @@ static struct file_hash *calculate_object_hash( strcmp(args->argv[i], "-idirafter") == 0 || strcmp(args->argv[i], "-isystem") == 0 || strcmp(args->argv[i], "-nostdinc") == 0 || - strcmp(args->argv[i], "-nostdinc++") == 0) { + strcmp(args->argv[i], "-nostdinc++") == 0 || + strcmp(args->argv[i], "-U") == 0) { /* Skip from hash. */ i++; continue; -- 2.47.3