[PATCH] D85540: [llvm-libtool-darwin] Add support for -l and -L

Sameer Arora via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 13:31:29 PDT 2020


sameerarora101 added inline comments.


================
Comment at: llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp:84
+
+static const std::vector<StringRef> StandardDirs{
+    "/lib/",
----------------
smeenai wrote:
> sameerarora101 wrote:
> > I defined `StandarDirs` based on cctools' libtool:
> > 
> > ```
> > /* the standard directories to search for -lx names */
> > char *standard_dirs[] = {
> >     "/lib/",
> >     "/usr/lib/",
> >     "/usr/local/lib/",
> >     NULL
> > };
> > ```
> Nit: I'd prefer a `std::array`. I think you can make it `constexpr` too?
> 
> I'd also prefer `StandardSearchDirs`.
Seems like I cannot have `constexpr` with `std::array<std::string, 3>`.  It says, "constexpr variable cannot have non-literal type 'const std::array<std::string, 3>' (aka 'const array<basic_string<char>, 3>')".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85540



More information about the llvm-commits mailing list