summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-01-16 20:36:27 +0000
committerNico Weber <nicolasweber@gmx.de>2019-01-16 20:36:27 +0000
commite5653be62a8019a1e02b931be42536344aeacd0e (patch)
tree40be0f6c96e10f12bdad36fb5434e47edd3f93ed
parent9b8bb323c94768ae788d77fc597f057d97b9eb17 (diff)
downloadbcm5719-llvm-e5653be62a8019a1e02b931be42536344aeacd0e.tar.gz
bcm5719-llvm-e5653be62a8019a1e02b931be42536344aeacd0e.zip
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
-rw-r--r--compiler-rt/test/cfi/CMakeLists.txt20
-rw-r--r--compiler-rt/test/safestack/CMakeLists.txt20
2 files changed, 22 insertions, 18 deletions
diff --git a/compiler-rt/test/cfi/CMakeLists.txt b/compiler-rt/test/cfi/CMakeLists.txt
index 4dbbf1759fc..d99213632d0 100644
--- a/compiler-rt/test/cfi/CMakeLists.txt
+++ b/compiler-rt/test/cfi/CMakeLists.txt
@@ -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
diff --git a/compiler-rt/test/safestack/CMakeLists.txt b/compiler-rt/test/safestack/CMakeLists.txt
index c56e81a3ce2..e30a676d74a 100644
--- a/compiler-rt/test/safestack/CMakeLists.txt
+++ b/compiler-rt/test/safestack/CMakeLists.txt
@@ -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()
OpenPOWER on IntegriCloud