forked from OSchip/llvm-project
[cmake] Enable thin lto cache when building with lld-link
This was enabled for other platforms. Added option for Windows/lld-link. Differential Revision: https://reviews.llvm.org/D69941
This commit is contained in:
parent
ff3b513495
commit
0a8bd77e77
|
@ -870,6 +870,9 @@ if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue