compiler-rt tests: Unbreak cmake with LLVM_ENABLE_PIC=OFF on mac

The LTO target doesn't exist with LLVM_ENABLE_PIC turned off.

Differential Revision: https://reviews.llvm.org/D56800

llvm-svn: 351373
This commit is contained in:
Nico Weber 2019-01-16 20:36:27 +00:00
parent 9b8bb323c9
commit e5653be62a
2 changed files with 22 additions and 18 deletions

View File

@ -74,15 +74,17 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)
opt
sanstats
)
if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR)
list(APPEND CFI_TEST_DEPS
LLVMgold
)
endif()
if(APPLE)
list(APPEND CFI_TEST_DEPS
LTO
)
if(LLVM_ENABLE_PIC)
if(LLVM_BINUTILS_INCDIR)
list(APPEND CFI_TEST_DEPS
LLVMgold
)
endif()
if(APPLE)
list(APPEND CFI_TEST_DEPS
LTO
)
endif()
endif()
if(NOT APPLE AND COMPILER_RT_HAS_LLD)
list(APPEND CFI_TEST_DEPS

View File

@ -6,15 +6,17 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND SAFESTACK_TEST_DEPS safestack)
# Some tests require LTO, so add a dependency on the relevant LTO plugin.
if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR)
list(APPEND SAFESTACK_TEST_DEPS
LLVMgold
)
endif()
if(APPLE)
list(APPEND SAFESTACK_TEST_DEPS
LTO
)
if(LLVM_ENABLE_PIC)
if(LLVM_BINUTILS_INCDIR)
list(APPEND SAFESTACK_TEST_DEPS
LLVMgold
)
endif()
if(APPLE)
list(APPEND SAFESTACK_TEST_DEPS
LTO
)
endif()
endif()
endif()