[cfe-commits] PATCH: Make Clang use the last option from "-g" group

Alexey Samsonov samsonov at google.com
Tue May 29 01:16:44 PDT 2012


On Tue, May 29, 2012 at 12:00 PM, Chandler Carruth <chandlerc at gmail.com>wrote:

> On Tue, May 29, 2012 at 12:46 AM, Alexey Samsonov <samsonov at google.com>wrote:
>
>> Hi!
>>
>> This change makes Clang driver pass only the last option from "-g" group
>> to the compiler:
>> * if it is -g0, no option is passed;
>> * if it is -gline-tables-only, this option is preserved;
>> * all other -g* options are substituted with -g.
>>
>> http://codereview.appspot.com/6243065/
>>
>
> Looks good. I left a minor comment to spruce up a test.
>

Submitted as r157602, thanks!

>
> The "This is wrong." comment makes me sad. We should eventually do
> something along the lines of the following:
>
> 1) for all the gdb & dwarf variations collapse them to just '-g'.
> 2) support things like -gtoggle
> 3) ignore a bunch of the flag options (-gstrict-dwarf,
> -grecord-gcc-switches, etc)
> 4) produce a driver error on -gstabs, -gcoff, -gvms, etc. All the formats
> that Clang/LLVM doesn't support
>
> We could leave a better fixme, or if you're feeling generous, you could
> work on this? It shouldn't be a lot of work...
>

I see. For this patch, I've just added these items to fixme, and will try
to fix them later this week.


>>
>> --
>> Alexey Samsonov, MSK
>>
>>
>


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120529/6b8999f6/attachment.html>


More information about the cfe-commits mailing list