[PATCH] D114397: [lld-macho] Mark dylib symbols coming from -weak_framework as weak-def.
Vincent Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 23 18:17:16 PST 2021
thevinster added inline comments.
================
Comment at: lld/MachO/SymbolTable.cpp:170
+ !wasForceWeak) {
+ replaceSymbol<DylibSymbol>(s, file, name, isWeakDef, refState, isTlv);
+ } else if (wasInserted || isa<Undefined>(s) ||
----------------
Hmm... I still don't understand why this change is needed. This code never gets run after the first framework gets loaded because it would short circuit and return the cached file (https://github.com/llvm/llvm-project/blob/main/lld/MachO/DriverUtils.cpp#L212). I think the `-weak_framework` is just meant to set the the `forceWeakImport` flag which is being accounted for in `Symbols.h`.
I pulled the diff in, removed all the changes in `SymbolTable` and only kept `Symbols.h` changes, and the test still passed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114397/new/
https://reviews.llvm.org/D114397
More information about the llvm-commits
mailing list