[PATCH] D38808: [CMake] Improve logic for enabling LTO on LLVM itself

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 14:57:20 PDT 2017


zturner updated this revision to Diff 118706.
zturner retitled this revision from "[CMake] Allow LLVM_ENABLE_LTO to use MSVC LTCG" to "[CMake] Improve logic for enabling LTO on LLVM itself".
zturner added a reviewer: tejohnson.
zturner added a comment.

1. Updated with suggestions from inglorion.  Specifically, `decide_lto_style` now either hard fails, or returns one of 4 values `thin, full, msvc, none`.
2. Deletes the codepath for treating `-flto` separately from `-flto=full`.  Since they are both the same, we just always use `-flto=full`
3. Merge all the codepaths for the different styles into a single one.  Instead of adding `-flto=thin` or `-flto=full`, we just add `-flto=${LTO_STYLE}`, collapsing some branches together.
4. Enables the ThinLTO cache when using lld-link.


https://reviews.llvm.org/D38808

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38808.118706.patch
Type: text/x-patch
Size: 6309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/2e235f54/attachment.bin>


More information about the llvm-commits mailing list