[PATCH] Make the driver accept all four variants of the target option

Renato Golin renato.golin at linaro.org
Thu Feb 19 03:59:23 PST 2015

In http://reviews.llvm.org/D7730#126290, @richard.barton.arm wrote:

> I think that having -target=<triple> and --target <triple> only is awkward.
>  Why have two version of the same option with different rules on whether they
>  accept = or spaced arguments?

Hi Richard,

There's a consensus in the Unix world that only two such syntaxes should be supported:

-key value

We only accept those two, and not the other two. This is intentional.

> I think Gabor's patch makes sense as it does not break any backwards

>  compatibility within clang itself and will only help people using the tool.

I agree that backwards compatibility is important, but forwards compatibility is equally so. Every new flag you add will create a backwards compatibility problem for you in the future, as well as forcing us to accept multiple flags on all our other tools (such as llc, lli, etc).

I'm curious as to why you guys need this change. Maybe, if you explain the reasons, we could find another, less problematic solution.





More information about the cfe-commits mailing list