[PATCH] D103499: [lld/mac] Implement -needed_framework, -needed_library, -needed-l

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 21:42:58 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:332-333
       dylibFile->explicitlyLinked = isExplicit;
+      if (isNeeded)
+        dylibFile->forceNeeded = true;
       if (isWeak)
----------------
why not just `dylibFile->forceNeeded = isNeeded`? (actually same question for forceWeakImport below... and I see we don't do that if check for `explicitlyLinked` above). I believe `addFile()` returns a new instance each time, so unconditionally setting these values should be fine


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

https://reviews.llvm.org/D103499



More information about the llvm-commits mailing list