[PATCH] D82923: introducing llvm-libtool

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 10:15:49 PDT 2020


smeenai added a comment.

@sameerarora101 answered a bunch of this above, but to add on a bit.

In D82923#2124779 <https://reviews.llvm.org/D82923#2124779>, @jhenderson wrote:

> 2. Is this significantly different to llvm-ar and its aliases? If so, please outline the differences.


http://lists.llvm.org/pipermail/llvm-dev/2020-June/142157.html highlights why we're creating this as a separate tool instead of an llvm-ar frontend, and the motivating features for that (e.g. universal binary support) should become clearer in follow-up diffs.

> 4. You may want to consider using `cl::opt` instead of the tablegen approach you're currently using, since it's simpler and I doubt you need complex logic here.
> 5. There are some basic error handling functions available in the Support library which might do all you need them to. Consider using them before rolling your own.

Both of these are the result of using llvm-lipo as a reference, but thinking back, llvm-lipo started with cl::opt and then switched to tablegen to handle more complicated argument parsing logic. Looking at libtool, I think cl::opt should be enough for its argument parsing needs, though I'd wanna think about that a bit more.

I thought there was also a mailing list discussion a while back about the two option parsing libraries and which one to prefer for new tools, though I can't remember the conclusions of that discussion (or even find it now).

For reference, cl::opt is documented at https://llvm.org/docs/CommandLine.html.

> 5. Is there going to be non-Darwin versions of this tool? If not, it doesn't need to be located in the Darwin sub-directory.

I'd want to keep the `llvm-libtool-darwin` name, to prevent confusion with GNU libtool (which is an entirely different tool), but I'm happy not having the sub-directory until someone actually intends to contribute a GNU version. (We have no such plans.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82923





More information about the llvm-commits mailing list