[lld] [llvm] [LLD] [COFF] Fix linking import libraries with -wholearchive: (PR #122806)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 02:52:24 PST 2025


cjacek wrote:

> Side note: Inspecting the short import libraries is quite messy, as all members have the same name; I have an old longstanding custom patch for llvm-ar that adds an extra option, that allows extracting them as foo.dll, foo.dll-2, foo.dll-3 etc, for inspecting import libraries. If you have any suggestion on a clean way to achieve the same with upstream functionality, or a way to handle this, I'm all ears.

A custom option sounds good to me. Based on the description, it seems like you had to detect duplicate names. Perhaps a simpler approach would be to prepend the member index to each file unconditionally (when the new option is used).

https://github.com/llvm/llvm-project/pull/122806


More information about the llvm-commits mailing list