• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set(CFI_LIT_TEST_MODE Standalone)
2configure_lit_site_cfg(
3  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
4  ${CMAKE_CURRENT_BINARY_DIR}/Standalone/lit.site.cfg
5  )
6
7set(CFI_LIT_TEST_MODE Devirt)
8configure_lit_site_cfg(
9  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
10  ${CMAKE_CURRENT_BINARY_DIR}/Devirt/lit.site.cfg
11  )
12
13set(CFI_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
14if(NOT COMPILER_RT_STANDALONE_BUILD)
15  list(APPEND CFI_TEST_DEPS
16    opt
17    ubsan
18    stats
19    sanstats
20  )
21  if(COMPILER_RT_HAS_CFI)
22    list(APPEND CFI_TEST_DEPS cfi)
23  endif()
24  if(LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR)
25    list(APPEND CFI_TEST_DEPS
26      LLVMgold
27    )
28  endif()
29  if(APPLE)
30    list(APPEND CFI_TEST_DEPS
31      LTO
32    )
33  endif()
34  if(WIN32 AND COMPILER_RT_HAS_LLD_SOURCES)
35    list(APPEND CFI_TEST_DEPS
36      lld
37    )
38  endif()
39endif()
40
41add_lit_testsuite(check-cfi "Running the cfi regression tests"
42  ${CMAKE_CURRENT_BINARY_DIR}/Standalone
43  ${CMAKE_CURRENT_BINARY_DIR}/Devirt
44  DEPENDS ${CFI_TEST_DEPS})
45
46add_lit_target(check-cfi-and-supported "Running the cfi regression tests"
47  ${CMAKE_CURRENT_BINARY_DIR}/Standalone
48  ${CMAKE_CURRENT_BINARY_DIR}/Devirt
49  PARAMS check_supported=1
50  DEPENDS ${CFI_TEST_DEPS})
51
52set_target_properties(check-cfi PROPERTIES FOLDER "Compiler-RT Misc")
53set_target_properties(check-cfi-and-supported PROPERTIES FOLDER "Compiler-RT Misc")
54