[PATCH] D19015: [LTO] ensure lto_codegen_debug_options() are passed on to LLVM

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 08:38:57 PDT 2016


On 13 April 2016 at 11:33, Paul Robinson
<Paul_Robinson at playstation.sony.com> wrote:
> probinson added a subscriber: probinson.
> probinson added a comment.
>
> In http://reviews.llvm.org/D19015#399467, @joker.eph wrote:
>
>> In http://reviews.llvm.org/D19015#399466, @thomasguest wrote:
>>
>> > In http://reviews.llvm.org/D19015#399462, @joker.eph wrote:
>> >
>> > > To put it differently: there is no command line option for LLVM (as a library), only APIs.
>> >
>> >
>> > Yes, what I am really after is a way to configure codegen when using LLVM via the LTO library. At the moment I cannot do so.
>>
>>
>> Yes, apparently no-one had this need till now, submit a patch :)
>
>
> Let me point out that the gold plugin works exactly this way (pass in cl options as a string).
> It might not be ideal but it's what we have today.
> LLVM-as-library doesn't really have another way to conjure up TargetOptions (I *think* clang creates one directly, sorry can't check right now, but that seems even more fragile).


No. In gold ParseCommandLineOptions is passed only options the user
itself passed to the plugin. So the gold plugin implements a debug
option with another.


Cheers,
Rafael


More information about the llvm-commits mailing list