[lld] [lld][WebAssembly] Match the ELF linker in transitioning away from archive indexes. (PR #78658)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 12:51:24 PST 2024
================
@@ -256,10 +257,12 @@ void LinkerDriver::addFile(StringRef path) {
if (fs::exists(importFile))
readImportFile(importFile.str());
+ auto members = getArchiveMembers(mbref);
+
// Handle -whole-archive.
if (inWholeArchive) {
- for (MemoryBufferRef &m : getArchiveMembers(mbref)) {
- auto *object = createObjectFile(m, path);
+ for (const std::pair<MemoryBufferRef, uint64_t> &p : members) {
----------------
MaskRay wrote:
I think it's cleaner to have a dedicate patch to change the signature of `getArchiveMembers`, which ports 0b1413a88151ce2d95ec8dd44b7d66bd4d59926d (ELF) first.
`thinlto-thin-archive-collision.ll` can be renamed to `thinlto-emit-index-thin-archive.ll`
https://github.com/llvm/llvm-project/pull/78658
More information about the llvm-commits
mailing list