[llvm] [Archive][COFF] Split hybrid COFF files when adding them to an archive (PR #205160)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 02:33:56 PDT 2026


================
@@ -855,6 +858,35 @@ computeMemberData(raw_ostream &StringTable, raw_ostream &SymNames,
       if (!SymFileOrErr)
         return createFileError(M.MemberName, SymFileOrErr.takeError());
       D.SymFile = std::move(*SymFileOrErr);
+
+      if (SymMap && D.SymFile.get()) {
----------------
mstorsjo wrote:

Another detail I noticed - this is within a condition `NeedSymbols != SymtabWritingMode::NoSymtab`. So if we're creating an archive without a symbol table (running `ar` without the `s` flag?), we won't be splitting the hybrid arm64x object files? That seems a little bit unexpected - but if it's important due to some implementation detail, I guess it can be tolerable - if the limitation is properly communicated.

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


More information about the llvm-commits mailing list