[PATCH] D30240: enable building with LTO on Windows using clang-cl and lld
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 15:39:38 PST 2017
hans added inline comments.
================
Comment at: cmake/modules/HandleLLVMOptions.cmake:709
+ append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
+ if(NOT CMAKE_LINKER MATCHES "link.exe$")
+ append("-flto=thin" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
----------------
inglorion wrote:
> hans wrote:
> > Isn't this check redundant now?
> It shouldn't be. This is used to differentiate lld-link.exe from things like ld and lld, which do need the flag. It also matches link.exe without "lld-", which perhaps is a bit confusing. I can change it to look for lld-link, specifically, if folks feel that would be better.
Oh right, I was reading this as checking for link.exe, not that it might also be lld-link.exe :-) This is subtle, but I'm not sure how to make it better.
https://reviews.llvm.org/D30240
More information about the llvm-commits
mailing list