[PATCH] D69418: [llvm-ar] Add output option for extract operation

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 04:56:24 PDT 2019


ruiu added a comment.

In D69418#1728381 <https://reviews.llvm.org/D69418#1728381>, @jhenderson wrote:

> Full disclosure: I'm coming from a system where there is only one ar tool, and using others isn't really supported. As such, I'm not bothered by adding new features to the tools that don't (yet) exist in GNU tools. If we do that more widely, we'll be held back in improving functionality by whatever the GNU community decide they want to accept. If we're going to start rejecting new options in llvm-ar, because GNU doesn't have/want them, we should start considering whether we should not be adding new options to llvm-objcopy/llvm-objdump/llvm-readelf etc, all of which I believe have options already that aren't in their GNU equivalents. Indeed, llvm-ar does too. It seems relatively unlikely to me that people will switch their binutils piecewise (although I could easily be wrong), so being concerned with one tool and not others seems inconsistent at least.
>
> That all being said, I do agree that we should be careful with option naming. If it's not going to be accepted in other tools, we should be careful what we call the switch. "--output" would be an obvious example of a name that could clash, so discussing with other communities like GNU was the right course of action. I guess if they'd not wanted it, that shouldn't have stopped the option being added (if there was a good use-case for it), but it would have meant perhaps a different switch name that is less likely to clash in the future.


I agree with you that we shouldn't be too conservative. We should be able to innovate without worrying too much about compatibility with other tools. That being said, at the same time we should make a reasonable effort to keep tools compatible because that's good for users, so I think asking GNU people to add the same functionality made sense. In particular, I don't think we want llvm-ar (which is a drop-in replacement from the beginning) to diverge too much from other ar tools, and that's perhaps different from llvm-{objdump,readelf,etc} tools which originally had a completely different set of command line options from GNU and gradually gain GNU-compatible options. So, I wouldn't oppose to a new option, but I think we should ask other tools to add the same functionality (which MaskRay did very well for this case!)


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

https://reviews.llvm.org/D69418





More information about the llvm-commits mailing list