[ccache] [PATCH] Hash also Clang plugins

2012-07-30 Thread Lubos Lunak

 Hello,

 please review and push the attached patch, which adds Clang plugins to the 
hash, similarly as is already done with GCC plugins.

-- 
 Lubos Lunak
 l.lu...@suse.cz
From 11b35610cf97b1540dc883b03e7ce059735bd04c Mon Sep 17 00:00:00 2001
From: Lubos Lunak l.lu...@suse.cz
Date: Thu, 26 Jul 2012 14:45:16 +0200
Subject: [PATCH] hash also Clang plugins

---
 ccache.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ccache.c b/ccache.c
index 8e36bdd..e5c2481 100644
--- a/ccache.c
+++ b/ccache.c
@@ -1061,6 +1061,16 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
 			continue;
 		}
 
+		if (str_eq(args-argv[i], -Xclang)
+		 i + 3  args-argc
+		 str_eq(args-argv[i+1], -load)
+		 str_eq(args-argv[i+2], -Xclang)
+		 stat(args-argv[i+3], st) == 0) {
+			hash_delimiter(hash, plugin);
+			hash_compiler(hash, st, args-argv[i+3], false);
+			continue;
+		}
+
 		/* All other arguments are included in the hash. */
 		hash_delimiter(hash, arg);
 		hash_string(hash, args-argv[i]);
-- 
1.7.7

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] [PATCH] Hash also Clang plugins

2012-07-30 Thread Joel Rosdahl
On 30 July 2012 19:03, Lubos Lunak l.lu...@suse.cz wrote:
 please review and push the attached patch, which adds Clang plugins to the
 hash, similarly as is already done with GCC plugins.

Thanks, applied.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache