[PATCH] D143540: [llvm-lib] Use COFF archive format in llvm-lib (other archive tools don't use this format).

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 16:40:18 PDT 2023


efriedma added inline comments.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:769
+  // COFF symbol map uses 16-bit indexes, so we can't use it if there are too
+  // many members.
+  if (isCOFFArchive(Kind) && NewMembers.size() > 0xfffe)
----------------
jacek wrote:
> efriedma wrote:
> > I'm curious, what does MSVC lib do here?  Refuse to construct the archive?  Skip creating the symbol table? Use some other output format?
> According to my testing, it has a limit of 4090 object files. When I try to pass more, I get an ambiguous error:
> $ lib -out:test.lib -nologo @inputs/files.txt
> LINK : fatal error LNK1104: cannot open file 'inputs\a4091.obj'
That's strange... maybe accidentally running into the C library's file handle limit.  What happens if you try adding additional files to a library that already contains 4090 object files?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143540/new/

https://reviews.llvm.org/D143540



More information about the llvm-commits mailing list