[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 13:35:38 PST 2021


thevinster added a comment.

Probably should look at the failing tests. Seems to be related to your changes.



================
Comment at: lld/MachO/Driver.cpp:391
       if (isWeak)
-        dylibFile->forceWeakImport = true;
+        assert(dylibFile->forceWeakImport);
       if (isReexport) {
----------------
Hmm.... I'm not sure why this change is needed? I think the original code of forcefully setting `forceWeakImport` on the dylibFile should be fine. I think the only change missing here is the change in `isWeakDef` and `isWeakRef` to make sure it accounts for the `forceWeakImport` flag which you already did in `Symbols.h`. Everything else can stay as is. 


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