[PATCH] D144153: [lld-macho] Support re-exports of individual symbols
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 25 21:30:15 PDT 2023
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.
It's interesting that ld64 overloads `-exported_symbol` for this purpose instead of having an explicit `-reexported_symbol` analog to `-reexported_symbols_list`. We should follow suit though, of course.
I'll leave the comment about `handleExplicitExports` to your judgment. LGTM otherwise.
================
Comment at: lld/MachO/SyntheticSections.cpp:982-983
+ } else if (auto *dysym = dyn_cast<DylibSymbol>(sym)) {
+ if (config->hasExplicitExports && config->exportedSymbols.match(sym->getName()))
+ trieBuilder.addSymbol(*dysym);
}
----------------
What do you think of moving this logic to `handleExplicitExports` in Driver.cpp and setting a flag on the DylibSymbol that's checked here instead? I ask because that one is parallelized, which presumably means that provided a measurable speedup in some builds, plus it seems conceptually nicer to handle the checking in one place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144153/new/
https://reviews.llvm.org/D144153
More information about the llvm-commits
mailing list