[PATCH] D30522: cmake: Configure the ThinLTO cache directory when using ELF lld or gold.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 18:57:30 PST 2017


mehdi_amini added a comment.

CC Bob, I suspect we should add the support for this option for lld-link on windows as well.



================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:724
+           CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+  elseif(UNIX AND LLVM_USE_LINKER STREQUAL "lld")
+    append("-Wl,--thinlto-cache-dir=${PROJECT_BINARY_DIR}/lto.cache"
----------------
Is LLVM_USE_LINKER  already normalized into lower case? It seems that STREQUAL is case sensitive.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:730
+           CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+  endif()
 elseif(uppercase_LLVM_ENABLE_LTO STREQUAL "FULL")
----------------
I'm fine with this for now, but I feel we should provide a clang driver option to abstract away all this logic.




https://reviews.llvm.org/D30522





More information about the llvm-commits mailing list