[PATCH] D69941: [cmake] Enable thin lto cache when building with lld-link

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 02:49:24 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0a8bd77e7741: [cmake] Enable thin lto cache when building with lld-link (authored by russell.gallop).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69941/new/

https://reviews.llvm.org/D69941

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -870,6 +870,9 @@
   elseif(LLVM_USE_LINKER STREQUAL "gold")
     append("-Wl,--plugin-opt,cache-dir=${PROJECT_BINARY_DIR}/lto.cache"
            CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+  elseif(LINKER_IS_LLD_LINK)
+    append("/lldltocache:${PROJECT_BINARY_DIR}/lto.cache"
+           CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
   endif()
 elseif(uppercase_LLVM_ENABLE_LTO STREQUAL "FULL")
   append("-flto=full" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69941.228395.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191108/7ef9fe72/attachment.bin>


More information about the llvm-commits mailing list