[PATCH] D29681: Handle -G as an alias to -shared

Michael Spencer via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 17:19:47 PST 2017


On Wed, Feb 8, 2017 at 4:37 PM, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> On Wed, Feb 8, 2017 at 4:35 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>>
>>
>> On Wed, Feb 8, 2017 at 5:54 AM, Rafael Avila de Espindola via
>> llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>>> Simon Atanasyan via Phabricator <reviews at reviews.llvm.org> writes:
>>>
>>> > atanasyan added a comment.
>>> >
>>> >> This patch changes lld to handle -G as an alias to -shared. This
>>> means we would now error on "-G 123". How common is it for programs to use
>>> it meaning --gpsize?
>>> >
>>> > On MIPS this option is rarely used for regular programs, but in case
>>> of Linux kernel build, embedded software etc it is commonly used. So it is
>>> better to continue ignore a numeric argument.
>>>
>>> NP, so far I have seen only one package that uses -G to mean -shared. I
>>> will try changing the package instead. It is probably not worth having
>>> the logic about -G with or without an argument.
>>>
>>
>> I thought libOption could handle this quite cleanly. Can you just leave
>> `def G: JoinedOrSeparate<["-"], "G">;` around?
>>
>
> Oh, nvm, it would somehow need to disambiguate that the argument to -G has
> to be a number. Not sure if it can do that. CC'ing Michael.
>

Not sure. I didn't write libOption, just moved it from clang it to llvm.

- Michael Spencer


>
> -- Sean Silva
>
>
>>
>> -- Sean Silva
>>
>>
>>>
>>> Cheers,
>>> Rafael
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170208/facc75b3/attachment.html>


More information about the llvm-commits mailing list