[PATCH] D76250: [llvm-objdump] Only reject -long-option in objdump mode

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 01:35:30 PDT 2020


jhenderson added a comment.

In D76250#1929314 <https://reviews.llvm.org/D76250#1929314>, @MaskRay wrote:

> I was also of the opinion that "llvm-objdump" (argv[0]) and "objdump" (argv[0]) should reject single-dash `-long-option`.
>
> However, @compnerd mentioned that on Mach-O platforms, `-long-option` may be used. Xcode uses the source code of llvm-objdump but it is not clear how they use the tool. They have patches and tests which are not upstreamed. If they provided a concrete tool name, I would like to allow `--long-option` when argv[0] matches that tool name (may be otool or something).
>
> If we know how they use the tool, for example, if they always pass `--macho`, we can get rid of the alias `-m`.


Hmm... I was under the impression we didn't have to pay much attention to downstream developers if it makes upstream more complicated (I've been on the other end of that point on a number of occasions...). We've got a concrete argument for not accepting single-dashed long options (it makes the code simpler and more compatible with GNU, by avoiding any ambiguity for short options), so it seems to me that there needs to be a very strong argument against this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76250





More information about the llvm-commits mailing list