summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-03-03 02:00:22 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-03-03 02:00:22 +0000
commit7935a2246e3ccf9719283806ad45c84db8361e05 (patch)
tree3ae89207d25a0f8d41c70034093d1fc60be61152 /llvm/cmake
parentb6fe13f26b68bb72a3959cf8db9429dc5c26f36d (diff)
downloadbcm5719-llvm-7935a2246e3ccf9719283806ad45c84db8361e05.tar.gz
bcm5719-llvm-7935a2246e3ccf9719283806ad45c84db8361e05.zip
Revert r296730, "cmake: Configure the ThinLTO cache directory when using ELF lld or gold."
Causes a build failure on the clang-with-thin-lto-ubuntu bot. http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/2117/steps/build-stage3-compiler/logs/stdio llvm-svn: 296850
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake19
1 files changed, 5 insertions, 14 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 8d9051cfdd7..d776285b80f 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -715,20 +715,11 @@ if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
if(NOT LINKER_IS_LLD_LINK)
append("-flto=thin" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
endif()
- # If the linker supports it, enable the lto cache. This improves initial build
- # time a little since we re-link a lot of the same objects, and significantly
- # improves incremental build time.
- # FIXME: We should move all this logic into the clang driver.
- if(APPLE)
- append("-Wl,-cache_path_lto,${PROJECT_BINARY_DIR}/lto.cache"
- 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"
- CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
- 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)
- endif()
+ # On darwin, enable the lto cache. This improves initial build time a little
+ # since we re-link a lot of the same objects, and significantly improves
+ # incremental build time.
+ append_if(APPLE "-Wl,-cache_path_lto,${PROJECT_BINARY_DIR}/lto.cache"
+ CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
elseif(uppercase_LLVM_ENABLE_LTO STREQUAL "FULL")
append("-flto=full" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
if(NOT LINKER_IS_LLD_LINK)
OpenPOWER on IntegriCloud