File: CMakeLists.txt

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (45 lines) | stat: -rw-r--r-- 1,484 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
set(HWASAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

set(HWASAN_TESTSUITES)

set(HWASAN_TEST_ARCH ${HWASAN_SUPPORTED_ARCH})

foreach(arch ${HWASAN_TEST_ARCH})
  set(HWASAN_TEST_TARGET_ARCH ${arch})
  string(TOLOWER "-${arch}" HWASAN_TEST_CONFIG_SUFFIX)
  get_test_cc_for_arch(${arch} HWASAN_TEST_TARGET_CC HWASAN_TEST_TARGET_CFLAGS)
  string(TOUPPER ${arch} ARCH_UPPER_CASE)
  set(CONFIG_NAME ${ARCH_UPPER_CASE})

  # FIXME: Set this.
  set(HWASAN_ANDROID_FILES_TO_PUSH [])

  configure_lit_site_cfg(
    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py)
  list(APPEND HWASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
endforeach()

set(HWASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD)
  list(APPEND HWASAN_TEST_DEPS hwasan)
  if(COMPILER_RT_HAS_LLD AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
    list(APPEND HWASAN_TEST_DEPS lld)
  endif()
endif()

add_lit_testsuite(check-hwasan "Running the HWAddressSanitizer tests"
  ${HWASAN_TESTSUITES}
  DEPENDS ${HWASAN_TEST_DEPS}
  PARAMS "HWASAN_ENABLE_ALIASES=1"
  )
set_target_properties(check-hwasan PROPERTIES FOLDER "Compiler-RT Misc")

add_lit_testsuite(check-hwasan-lam
  "Running the HWAddressSanitizer tests with Intel LAM"
  ${HWASAN_TESTSUITES}
  DEPENDS ${HWASAN_TEST_DEPS}
  PARAMS "HWASAN_ENABLE_ALIASES=0"
  EXCLUDE_FROM_CHECK_ALL
  )
set_target_properties(check-hwasan-lam PROPERTIES FOLDER "Compiler-RT Misc")