forked from OSchip/llvm-project
[CMake] Separate LLVM_ENABLE_LTO and LLVM_ENABLE_LLD
These two are independent: it's possible to use LLD without LTO, and it's possible to do LTO build without LLD. Differential Revision: https://reviews.llvm.org/D28821 llvm-svn: 292343
This commit is contained in:
parent
673c5f9cea
commit
0320314249
|
@ -515,6 +515,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
|||
set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-stamps/)
|
||||
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-bins/)
|
||||
|
||||
if(BOOTSTRAP_LLVM_ENABLE_LLD)
|
||||
add_dependencies(clang-bootstrap-deps lld)
|
||||
endif()
|
||||
|
||||
# If the next stage is LTO we need to depend on LTO and possibly lld or LLVMgold
|
||||
if(BOOTSTRAP_LLVM_ENABLE_LTO OR LLVM_ENABLE_LTO AND NOT LLVM_BUILD_INSTRUMENTED)
|
||||
if(APPLE)
|
||||
|
@ -531,9 +535,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
|||
-DDYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR})
|
||||
elseif(NOT WIN32)
|
||||
add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
|
||||
if(BOOTSTRAP_LLVM_ENABLE_LLD)
|
||||
add_dependencies(clang-bootstrap-deps lld)
|
||||
elseif(LLVM_BINUTILS_INCDIR)
|
||||
if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
|
||||
add_dependencies(clang-bootstrap-deps LLVMgold)
|
||||
endif()
|
||||
set(LTO_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
|
||||
|
|
Loading…
Reference in New Issue