r231787 - Allow -target= and --target options

Renato Golin renato.golin at linaro.org
Wed Mar 11 14:20:46 PDT 2015


I originally disliked the change but failed to come up with a strong
technical argument and other folks seemed all happy.

Maybe we should come up with a draft on what we want for options?

I don't have a strong opinion and am fine either way.

Cheers,
Renato
On 11 Mar 2015 21:16, "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.
>
>
>>
>> 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/9bed0a65/attachment.html>


More information about the cfe-commits mailing list