[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 Apr 9 01:03:46 PDT 2020


jhenderson added a comment.

In D76250#1970669 <https://reviews.llvm.org/D76250#1970669>, @compnerd wrote:

> @jhenderson Traditionally, the long options all must come after the short options.


Traditionally for who?

> Honestly, all the arguments have been "we like the GNU options because that's what we are used to" rather than any real technical issue.

It's more like there's a straight-up use-case incompatibility here. For those trying to migrate their toolchain from GNU, they may run into breakages, due to the way llvm-objdump's option parsing works currently. Based on conversations I've had in the past at round tables etc, many people want a strict drop-in replacement, because the tweaking of configure scripts that often use these tools simply isn't possible.

> Doing a prefix match seems reasonable way to handle this.

I highlighted in my other comments why a prefix match is problematic. It doesn't help every use-case (some people use prefixes on the tool name), and potentially (depending on whether we adjust build scripts like we have for other versions of this) bloats the build output.

Could we base the behaviour on the host OS instead of the tool name? If the OS is Mach-O, allow single-dash long options, otherwise don't?


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