[PATCH] D85540: [llvm-libtool-darwin] Add support for -l and -L
Sameer Arora via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 11:13:12 PDT 2020
sameerarora101 added inline comments.
================
Comment at: llvm/test/tools/llvm-libtool-darwin/L-and-l.test:1
+## This test checks that -l and -L options work correctly.
+
----------------
It doesn't make sense to test `-L` option individually as the directory specified under that option is used (prepended) only if some library is also specified with option `-l`.
To test `-l` individually, I would need to create a library in one of the standard directories (`/lib/`, `/usr/lib`, `/usr/local/lib`). Is there a way I can do that in a test file? Thanks.
================
Comment at: llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp:84-88
+static const std::vector<StringRef> StandardDirs{
+ "/lib/",
+ "/usr/lib/",
+ "/usr/local/lib/",
+};
----------------
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
};
```
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