From: Joel Rosdahl Date: Sat, 2 Aug 2025 19:09:31 +0000 (+0200) Subject: feat: Don't log failure when removing output file in hard link mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cff133a3703fc8327d667f6e443541b99f33924;p=thirdparty%2Fccache.git feat: Don't log failure when removing output file in hard link mode If there is no preexisting output object file then we shouldn't indicate an error. --- diff --git a/src/ccache/ccache.cpp b/src/ccache/ccache.cpp index 4f6ecb2c..64a0f48f 100644 --- a/src/ccache/ccache.cpp +++ b/src/ccache/ccache.cpp @@ -1190,10 +1190,11 @@ to_cache(Context& ctx, if (ctx.config.hard_link() && !util::is_dev_null_path(ctx.args_info.output_obj)) { - // Workaround for Clang bug where it overwrites an existing object file - // when it's compiling an assembler file, see - // . - util::remove_nfs_safe(ctx.args_info.output_obj); + // Workaround for Clang bug where it overwrites an existing object file when + // it's compiling an assembler file (see + // ): remove any preexisting + // output object file. + util::remove_nfs_safe(ctx.args_info.output_obj, util::LogFailure::no); } if (ctx.args_info.generating_diagnostics) {