[PATCH] D30240: enable building with LTO on Windows using clang-cl and lld

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 15:25:35 PST 2017


inglorion 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)
----------------
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.


https://reviews.llvm.org/D30240





More information about the llvm-commits mailing list