[PATCH] D85404: [lld-macho] Handle TAPI and regular re-exports uniformly

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 13:30:36 PDT 2020


int3 added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:375
+
+  for (InterfaceFile &intf : make_pointee_range(inlineDocuments))
+    if (path == intf.getInstallName())
----------------
smeenai wrote:
> int3 wrote:
> > smeenai wrote:
> > > If I'm understanding correctly, this will only be able to find any inline documents we've seen in our input files thus far. Does this match ld64, or is it able to find inline documents from later files?
> > ld64 is indeed able to find documents from later files. It seems like pretty bizarre behavior to me, though -- what would be the use case? (In my initial implementation, I actually tried to limit re-exports in tbds to reference just those in the same file because I thought that made the most sense, but it was more awkward to implement that...)
> Yeah, I'd also find it weird to reference sub-documents from other files, and I don't know if it's actually used in the SDKs.
For a quick sanity check, I got `lld` to load all the non-Swift TBDs under the iPhone simulator's `/usr/lib` folder, and it worked fine. I did it twice, the second time with all the command-line `-l` arguments in reverse, and that worked too. So it seems like we don't have any cross-file references to inline documents.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85404



More information about the llvm-commits mailing list