[PATCH] D30240: enable building with LTO on Windows using clang-cl and lld
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 11:38:25 PST 2017
mehdi_amini added inline comments.
================
Comment at: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake:717
+ append("-flto=thin" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+ endif()
# On darwin, enable the lto cache. This improves initial build time a little
----------------
mehdi_amini wrote:
> I don't understand this, this sounds suspicious to me. This is the flag we use to invoke *clang* for the linker step AFAIK, and it is up to clang to not pass the flag down to the lld-link job if not supported.
For instance ld64 on macOS does not accept -flto either, but we still configure -flto here for the link stage invocation and leave up to the clang driver to handle the correct linker invocation.
Repository:
rL LLVM
https://reviews.llvm.org/D30240
More information about the llvm-commits
mailing list