]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Hash mtime or content of GCC plugins specified with -fplugin=
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 5 Jan 2012 14:58:50 +0000 (15:58 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 5 Jan 2012 14:58:50 +0000 (15:58 +0100)
ccache.c

index cd9d08c0928c00bbd8b4d4d5fbb844f027abbdcc..0af8c0909c505e6f8832412150e89d3f0b9d23c1 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -936,6 +936,13 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
                        continue;
                }
 
+               if (str_startswith(args->argv[i], "-fplugin=")
+                   && stat(args->argv[i] + 9, &st) == 0) {
+                       hash_delimiter(hash, "plugin");
+                       hash_compiler(hash, &st, args->argv[i] + 9, false);
+                       continue;
+               }
+
                /* All other arguments are included in the hash. */
                hash_delimiter(hash, "arg");
                hash_string(hash, args->argv[i]);