]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don’t create <objectfile>.ccache-log when there is no object file
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 8 Sep 2020 18:39:35 +0000 (20:39 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 8 Sep 2020 18:39:35 +0000 (20:39 +0200)
Fixes #656.

src/Context.cpp

index 2d9155965793ea931f3158b0637af8a6f5b1b92e..c78e1254bd72dc9ec1f41f34a957b62f9adbf93c 100644 (file)
@@ -48,7 +48,7 @@ Context::~Context()
   unlink_pending_tmp_files();
 
   // Dump log buffer last to not lose any logs.
-  if (config.debug()) {
+  if (config.debug() && !args_info.output_obj.empty()) {
     std::string path = fmt::format("{}.ccache-log", args_info.output_obj);
     Logging::dump_log(path);
   }