]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Hash the cwd if we're outputting to our object file first
authorChris AtLee <catlee@mozilla.com>
Thu, 21 Jul 2011 20:36:35 +0000 (16:36 -0400)
committerChris AtLee <catlee@mozilla.com>
Thu, 21 Jul 2011 20:36:35 +0000 (16:36 -0400)
ccache.c

index a44d6b1c03a7c87aa9be85b9343ab7dfb2efff5d..ef085aaec12f94ef74321409ccddd14c7c9007eb 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -933,7 +933,7 @@ calculate_common_hash(struct args *args, struct mdfour *hash)
        hash_string(hash, basename(args->argv[0]));
 
        /* Possibly hash the current working directory. */
-       if (getenv("CCACHE_HASHDIR")) {
+       if (getenv("CCACHE_HASHDIR") || output_to_real_object_first) {
                char *cwd = gnu_getcwd();
                if (cwd) {
                        hash_delimiter(hash, "cwd");