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

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 14:52:35 PST 2016



Sent from my iPhone

> On Feb 8, 2016, at 2:02 PM, Justin Bogner <mail at justinbogner.com> wrote:
> 
> 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".

Great! Thanks :)

Mehdi


More information about the llvm-commits mailing list