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

Rafael EspĂ­ndola via cfe-dev cfe-dev at lists.llvm.org
Mon May 30 16:52:42 PDT 2016


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.

Cheers,
Rafael



More information about the cfe-dev mailing list