[PATCH] D103821: [lld/mac] Add reexports after reexporter to inputFiles

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 12:27:30 PDT 2021


int3 added a comment.

> We already did most of that, we just added reexports before the reexporter.

Hmm I thought we avoided adding re-exports to the `inputFiles` SetVector unless `isImplicitlyLinked()` returned true for them in `loadReexport()`. How does this change work with that? Perhaps after D103430 <https://reviews.llvm.org/D103430> we should always insert re-exports into `inputFiles` and set the `explicitlyLinked` flag accordingly?

As an aside, I would love for us to clean up the inputFile insertion / `printEachFile` logic, which AFAICT should always happen together for ObjFiles and DylibFiles. Right now some of them happen inside the ctors and some outside... I think we should be consistent about this. Can be done in a separate diff though (and I'm happy to do it myself).

Aside 2: `isImplicitlyLinked` is a rather confusing name (though ld64 uses "implicit" in the same sense), given that this comment https://github.com/llvm/llvm-project/blob/main/lld/MachO/Writer.cpp#L688 uses implicit/explicit to mean the reverse. We should probably rename/rephrase either one...


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

https://reviews.llvm.org/D103821



More information about the llvm-commits mailing list