[llvm] r259766 - cmake: Add a flag to enable LTO

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 14:02:33 PST 2016


Teresa Johnson <tejohnson at google.com> writes:
> On Mon, Feb 8, 2016 at 10:14 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>>
>> > On Feb 8, 2016, at 10:10 AM, Justin Bogner <mail at justinbogner.com>
>> wrote:
>> >
>> > Mehdi AMINI <mehdi.amini at apple.com> writes:
>> >> joker.eph added a subscriber: joker.eph.
>> >> joker.eph added a comment.
>> >
>> > Please keep patch review on-list. It seems whatever phabricator feature
>> > this is just sends personal emails in a new thread with no patch
>> > context. I've dug up the original thread and restored the context.
>>
>> Good point...
>>
>> >
>> >> Could we support a string flag instead of a boolean? (I don't know if
>> >> CMake options can be enums)
>> >> The clang "-flto" accepts both "full" and "thin" as an argument, and
>> >> it would be nice to support it first class in the configuration.
>> >
>> > This seems reasonable, but it would have to allow/use by default the
>> > form without an '=' so that this can be used with gcc as well.
>>
>> Good point (as well)!
>>
>> > I'm thinking something like -DLLVM_LTO_MODE={off,on,full,thin}. WDYT?
>>
>
> That sounds good to me. It is similar to the driver option which maps -flto
> to -flto=full.

Done in r260143. I kept the LLVM_ENABLE_LTO name, but it now accepts
"thin" or "full" as arguments as well as "on" or "off".


More information about the llvm-commits mailing list