r231787 - Allow -target= and --target options

Richard Smith richard at metafoo.co.uk
Wed Mar 11 14:27:21 PDT 2015


On Wed, Mar 11, 2015 at 2:16 PM, Chandler Carruth <chandlerc at google.com>
wrote:

> 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.
>

The previous state was that we allowed -target blah and --target=blah, but
not -target=blah nor --target blah. This new state seems better than that
in some ways, but neither is particularly satisfactory.

Do you object to relaxing the mandatory ‘=’ or allowing both single and
>> double – versions or both?
>>
>>
> Both.
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150311/118d4651/attachment.html>


More information about the cfe-commits mailing list