[cfe-dev] [llvm-dev] How to debug if LTO generate wrong code?

Mehdi Amini via cfe-dev cfe-dev at lists.llvm.org
Mon May 30 16:55:27 PDT 2016



Sent from my iPhone

> On May 30, 2016, at 4:52 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 
>> On 30 May 2016 at 16:56, Mehdi Amini <mehdi.amini at apple.com> wrote:
>> 
>> 
>> On 05/30/16 01:34 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>> 
>> We don't use cl::opt in gold, instead we parse the -plugin-opts that
>> gold passes the plugin (see process_plugin_option).
>> 
>> What about that:
>> 
>> $ grep ParseCommandLineOptions tools/gold/gold-plugin.cpp
>> 
>>      // ParseCommandLineOptions() expects argv[0] to be program name.
>> Lazily
>> 
>>    cl::ParseCommandLineOptions(NumOpts, &options::extra[0]);
> 
> 
> That is for the options that the gold plugin itself doesn't understand
> and just passes to llvm. This allows you to do things like
> --plugin-opt=-debug-pass=Arguments.

This is what I expected, so my cl:opt should work, right? I don't really get your original point?

Mehdi



More information about the cfe-dev mailing list