]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve debug logging of file hashes in depend mode
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 8 Apr 2019 19:43:12 +0000 (21:43 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 8 Apr 2019 19:43:12 +0000 (21:43 +0200)
Previously raw bytes were written to the .ccache-text-input file but now
human-readable hex string versions are written instead.

doc/NEWS.adoc
src/ccache.c

index ce2971cd4517f2a3642d6fd90c25a8692c827d2c..1d84cc06f17a61458fe437e77be770592dc0fe69 100644 (file)
@@ -59,6 +59,8 @@ Changes
 
 * Bail out on too hard compiler option `-gtoggle`.
 
+* Improved debug logging of file hashes in depend mode.
+
 
 ccache 3.6
 ----------
index 44055232a88d23666d1e2f10c64eadc2a39d3066..970497e90dc756ccd4d2b23411acdb74e10552ca 100644 (file)
@@ -742,7 +742,9 @@ remember_include_file(char *path, struct hash *cpp_hash, bool system,
 
                if (depend_mode_hash) {
                        hash_delimiter(depend_mode_hash, "include");
-                       hash_buffer(depend_mode_hash, h->hash, sizeof(h->hash));
+                       char *result = hash_result(fhash);
+                       hash_string(depend_mode_hash, result);
+                       free(result);
                }
        }