[PATCH] D80677: [lld-macho] Handle framework search path, alongside library search path

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 23:58:07 PDT 2020


int3 added a comment.

minor nit, I'm fine if you prefer to keep things the way they are right now though



================
Comment at: lld/MachO/Driver.cpp:126-158
+static std::vector<StringRef> getLibrarySearchPaths(opt::InputArgList &args) {
+  std::vector<StringRef> paths;
+  for (auto const &path : args::getStrings(args, OPT_L)) {
+    if (isDirectory("L", path))
+      paths.push_back(path);
+  }
+  if (!args.hasArg(OPT_Z) && Triple(sys::getProcessTriple()).isOSDarwin()) {
----------------
nit: could we factor out the common logic into a helper function, something like `getSearchPaths(const std::vector<StringRef>& argPaths, const std::vector<StringRef>& sysDefaultPaths)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80677





More information about the llvm-commits mailing list