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

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 14:21:09 PDT 2020


smeenai added inline comments.


================
Comment at: llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp:72-74
+        "l<x> searches for the library libx.a in the library search path. If"
+        " the string 'x' ends with '.o', then the library 'x' is searched for"
+        " without prepending 'lib' or appending '.a'"),
----------------
sameerarora101 wrote:
> jhenderson wrote:
> > I just want to make sure the behaviour here is definitely what's documented and that it doesn't search for `libfoo.o.a` for `-lfoo.o`? We probably need a test case for that.
> Yup, the behavior here is definitely what's documented. My first test case is testing this only where I pass in `-larchive-object.o`. Also, I have now changed that test by passing in `-l%basename_t.tmp-input1.o` instead of `archive-object` as per @smeenai's recommendation above.
I think @jhenderson meant that we should also add a case where you have e.g. a file called `libfoo.o.a`, you pass `-lfoo.o`, and you make sure that you get an error about a missing file (i.e. confirming that when you have a `-l` argument ending in `.o`, you **only** search for the name as-is).


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