]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Hash '-ccbin' argument
authorSam Gross <sgross@fb.com>
Tue, 1 Nov 2016 17:45:26 +0000 (10:45 -0700)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 3 Feb 2018 09:20:26 +0000 (10:20 +0100)
ccache.c

index 22a76cf39c3e54f3b8d63443d3a1f5cc5dc36d2d..cecf86a3791daefe795525bbadd6595726a2800f 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1743,6 +1743,16 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
                        continue;
                }
 
+               if ((str_eq(args->argv[i], "-ccbin")
+                    || str_eq(args->argv[i], "--compiler-bindir"))
+                    && i + 1 < args->argc
+                    && x_stat(args->argv[i+1], &st) == 0) {
+                       hash_delimiter(hash, "ccbin");
+                       hash_compiler(hash, &st, args->argv[i+1], false);
+                       i++;
+                       continue;
+               }
+
                // All other arguments are included in the hash.
                hash_delimiter(hash, "arg");
                hash_string(hash, args->argv[i]);