]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don’t look up or store tmp stderr files in i-node cache
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 5 Aug 2020 18:52:25 +0000 (20:52 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Aug 2020 14:23:15 +0000 (16:23 +0200)
The tmp.cpp_stderr file produced by the preprocessor is looked up and
stored in the i-node cache, which is wasted effort since it’s a
temporary file.

src/ccache.cpp

index f501d8c0e42e34638990686dcb3a1789c46a5e6c..1b6f99766f7f9274bb8ac41ca3af9841e91f58c3 100644 (file)
@@ -1046,8 +1046,7 @@ get_result_name_from_cpp(Context& ctx, Args& args, Hash& hash)
   }
 
   hash.hash_delimiter("cppstderr");
-  if (!ctx.args_info.direct_i_file
-      && !hash_binary_file(ctx, hash, stderr_path)) {
+  if (!ctx.args_info.direct_i_file && !hash.hash_file(stderr_path)) {
     // Somebody removed the temporary file?
     log("Failed to open {}: {}", stderr_path, strerror(errno));
     throw Failure(STATS_ERROR);