[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 2 01:03:12 PDT 2020


jhenderson added a comment.

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

> @jhenderson - accepting GNU options in GNU mode makes sense.  This tool is *not* GNU - `objdump` is the GNU driver, `llvm-objdump` is the LLVM driver and accepts SUN style arguments.


llvm-objdump doesn't have a GNU/LLVM mode distinction, and I'd prefer to avoid adding one based on tool names if possible because these sorts of things lead to various problems when people want to rename files. For example, in the current patch, if I rename my copy of `objdump`, which happens to really be `llvm-objdump`, to, say `my-objdump`, it will suddenly change behaviour (this isn't an imaginary case either, I am involved in a toolchain where prefixes on the name are commonplace). This is a very similar problem to the issue that led to https://bugs.llvm.org/show_bug.cgi?id=45271 for llvm-objcopy. Whilst in this case, the difference is whether or not to accept long options, starting a precedent will mean that other behaviours will be configured differently in the future no doubt.


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