[PATCH] D126046: [lld-macho] Support -non_global_symbols_strip_list, -non_global_symbols_no_strip_list, -x
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 21 16:38:44 PDT 2022
oontvoo marked an inline comment as done.
oontvoo added inline comments.
================
Comment at: lld/MachO/Driver.cpp:1443
+ if (hasInclude) {
+ error("cannot use both -non_global_symbols_no_strip_list and "
+ "-non_global_symbols_strip_list");
----------------
MaskRay wrote:
> FWIW ld.lld uses `error: ... and ... may not be used together`
why?
This was worded this way to be consistent with the error message w.r.t `exported_symbol` (right a few lines above) AND LD64's error messages.
================
Comment at: lld/MachO/SyntheticSections.cpp:966
+ std::function<void(Symbol *)> localSymbolsHandler;
+ switch (config->localSymbolsPresence) {
----------------
MaskRay wrote:
> It seems simpler to use `bool(Symbol *)` and let the for loop call `addSymbol(localSymbols, sym);`
I dont think that'd be simpler because all the callers would have to repeat the same check.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126046/new/
https://reviews.llvm.org/D126046
More information about the llvm-commits
mailing list