[lld] [lld-macho] Save all thin archive members in repro tarball (PR #97169)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 11:53:27 PDT 2024


================
@@ -349,7 +349,14 @@ static InputFile *addFile(StringRef path, LoadType loadType,
         Error e = Error::success();
         for (const object::Archive::Child &c : file->getArchive().children(e)) {
           Expected<MemoryBufferRef> mb = c.getMemoryBufferRef();
-          if (!mb || !hasObjCSection(*mb))
+          if (!mb) {
+            // Thin archives from repro tarballs can contain missing members
+            // if the member was not loaded later during the initial link.
----------------
nico wrote:

That makes sense to me, yes.

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


More information about the llvm-commits mailing list