r231787 - Allow -target= and --target options

Chandler Carruth chandlerc at google.com
Wed Mar 11 14:16:55 PDT 2015


On Wed, Mar 11, 2015 at 2:10 PM, Richard Barton <richard.barton at arm.com>
wrote:

> Hi Chandler
>
>
>
> Gabor’s patch seems uncontroversial to me and the new behaviour matches
> many other applications using unix getopt.
>
>
>
> Could you say why you think it is a mistake?
>

Because I think it is better to have a consistent syntax.

While it matches some uses of getopt, it doesn't match the prevalent
commandline flag syntax of newer command line tools where short options are
single '-' and single character (and can be combined), but long options
have '--', cannot be combined, and require an '='s.

I don't think this makes sense as a short option as well, and I would
prefer we have a single unambiguous spelling of the long option.

We have started trying to consistently use this long-option syntax for
flags which are very high-level flags completely handled by the clang
driver such as '--target='. I would like to see us get more consistent in
this single spelling rather than less consistent. The deviations from it
should be to preserve necessary compatibility.


>
> Do you object to relaxing the mandatory ‘=’ or allowing both single and
> double – versions or both?
>
>
Both.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150311/34e5a03d/attachment.html>


More information about the cfe-commits mailing list