]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Restore order of cpp and cppstderr sections in input hash
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 22 Jul 2022 20:35:35 +0000 (22:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 20 Aug 2022 12:11:54 +0000 (14:11 +0200)
This retains input hash compatibility with revisions before
64fc42ca2c5c9fe60ef4f1dc3882edb5f35579d6.

(cherry picked from commit 11f3d650f94fce6766302642c74b92462c263bdd)

src/ccache.cpp

index 561b5c3d8bf86965f44231757842a10e7f02877d..ec33db832bd47f9a5a3944b139ff663d7e750f16 100644 (file)
@@ -1170,12 +1170,12 @@ get_result_key_from_cpp(Context& ctx, Args& args, Hash& hash)
     cpp_stderr_data = result->stderr_data;
   }
 
-  hash.hash_delimiter("cppstderr");
-  hash.hash(cpp_stderr_data);
-
   hash.hash_delimiter("cpp");
   TRY(process_preprocessed_file(ctx, hash, preprocessed_path));
 
+  hash.hash_delimiter("cppstderr");
+  hash.hash(cpp_stderr_data);
+
   ctx.i_tmpfile = preprocessed_path;
 
   if (!ctx.config.run_second_cpp()) {