Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / safestack / CMakeLists.txt
blob2746102bd89b3bcb4a3f86aeeabff6ecf878e215
1 set(SAFESTACK_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2 set(SAFESTACK_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
4 set(SAFESTACK_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
5 list(APPEND SAFESTACK_TEST_DEPS safestack)
6 if(NOT COMPILER_RT_STANDALONE_BUILD)
7   # Some tests require LTO, so add a dependency on the relevant LTO plugin.
8   if(LLVM_ENABLE_PIC)
9     if(LLVM_BINUTILS_INCDIR)
10       list(APPEND SAFESTACK_TEST_DEPS
11         LLVMgold
12       )
13     endif()
14     if(APPLE)
15       list(APPEND SAFESTACK_TEST_DEPS
16         LTO
17       )
18     endif()
19   endif()
20 endif()
22 configure_lit_site_cfg(
23   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
24   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
25   )
27 add_lit_testsuite(check-safestack "Running the SafeStack tests"
28   ${CMAKE_CURRENT_BINARY_DIR}
29   DEPENDS ${SAFESTACK_TEST_DEPS})
30 set_target_properties(check-safestack PROPERTIES FOLDER "Compiler-RT Misc")