[PATCH] D142248: [lld-macho] Do not warn on missing /usr/local/lib library search path

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 02:53:30 PST 2023


int3 added a comment.

Looks like /Library/Frameworks is treated similarly: https://github.com/apple-oss-distributions/ld64/blob/main/src/ld/Options.cpp#L4415

I was thinking that instead of hardcoding those two values in `warnIfNotDirectory`, we could instead convert the last parameter of

  getSearchPaths(unsigned optionCode, InputArgList &args,
                 const std::vector<StringRef> &roots,
                 const SmallVector<StringRef, 2> &systemPaths)

into

  getSearchPaths(unsigned optionCode, InputArgList &args,
                 const std::vector<StringRef> &roots,
                 StringRef systemPath, StringRef optionalSystemPath)

& then skip warning if `optionalSystemPath` doesn't exist.

Also, could we have a test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142248



More information about the llvm-commits mailing list