[LLVMdev] getting gold plugin to work?

Nick Lewycky nicholas at mxc.ca
Mon Oct 5 23:05:55 PDT 2009


Rafael Espindola wrote:
>> If we can decide the way we want the options passed, I can take a stab
>> at it (or more likely Viktor will).
> 
> The linker has a -plugin-opt option. You probably do something like
> 
> -fplugin-opt=-mcpu=

The gold plugin has its own option list, it doesn't pass options through 
to LLVM -- which come to think of it would probably be a really good 
idea. Adding a call to "cl::ParseCommandLineOptions" for the unknown 
options would be a good change to have.

Nick

>> I'd expect that gold will need an option that tells it that some
>> following option or options are to be passed to the plugin. The plugin
>> API will need to pass these flags down. Any suggestions here that
>> would be compatible with the FSF view of the universe would be
>> welcome.
> 
> On the gcc plugin we just reexec gcc, so the plugin options are gcc
> options. Not sure if there is much to be gained here since the two
> plugins are independent.
> 
>> I assume the plugin's options should be either the existing cl::opt
>> ones (-mcpu, etc.) or similar to the llc ones.
> 
> You are free to name it, but using something similar to a llc option
> is probably a good idea.
> 
>> deep
>>
> 
> 
> Cheers,




More information about the llvm-dev mailing list