[PATCH] D104230: [gold] Release input files in claim_file
Timm Bäder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 14 09:18:30 PDT 2021
tbaeder updated this revision to Diff 351894.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104230/new/
https://reviews.llvm.org/D104230
Files:
llvm/tools/gold/gold-plugin.cpp
Index: llvm/tools/gold/gold-plugin.cpp
===================================================================
--- llvm/tools/gold/gold-plugin.cpp
+++ llvm/tools/gold/gold-plugin.cpp
@@ -556,6 +556,14 @@
return *claimed ? LDPS_ERR : LDPS_OK;
}
+ if (!options::thinlto) {
+ // Close the fd now. The linker opens it specifically for this claim_file
+ // call and doesn't close it.
+ // When thinlto is enabled, we need to keep it open but we can still close
+ // it when thinlto is disabled.
+ release_input_file(file->handle);
+ }
+
std::unique_ptr<InputFile> Obj = std::move(*ObjOrErr);
Modules.emplace_back();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104230.351894.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/ff58d70d/attachment.bin>
More information about the llvm-commits
mailing list