[PATCH] D39538: [llvm-ar] Support an options string that start with a dash

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 11:34:40 PDT 2017


mstorsjo added a comment.

In https://reviews.llvm.org/D39538#914200, @ruiu wrote:

> Why don't you just strip the leading dash? I think the first argument is always flags (e.g. `ar somesome.a` doesn't make sense), so we could always handle `ar -something` as if `ar something`.


The big issue is that llvm-ar has got options of its own that are dash/doubledash-prefixed, so you can have `llvm-ar -format gnu [-]crs foo.a obj.o`. We don't know what of these are options and what are "all the other args" until we run the command line parser.


https://reviews.llvm.org/D39538





More information about the llvm-commits mailing list