Просмотр исходного кода

Actually add the requested comment from review (#6390)

The review of #6380 suggested an expanded comment that I wrote but
apparently didn't hit "save" in the editor for. Doh! This adds it.
Chandler Carruth 5 месяцев назад
Родитель
Сommit
35274f2620
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      toolchain/driver/clang_runtimes.cpp

+ 4 - 2
toolchain/driver/clang_runtimes.cpp

@@ -200,8 +200,10 @@ auto ClangRuntimesBuilderBase::ArchiveBuilder::CompileMember(
                                llvm::fmt_consume(obj_result.takeError())));
   }
 
-  // Unlink the object file once we've read it. However, we log and ignore
-  // any errors here as they aren't fatal.
+  // Unlink the object file once we've read it -- we only want to retain the
+  // copy inside the archive member and there's no advantage to using
+  // thin-archives or something else that leaves the object file in place.
+  // However, we log and ignore any errors here as they aren't fatal.
   auto unlink_result = builder_->runtimes_builder_->dir().Unlink(obj_path);
   if (!unlink_result.ok()) {
     CARBON_VLOG("Unable to unlink object file `{0}`: {1}\n", obj_path,