File: CMakeLists.txt

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (53 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download | duplicates (4)
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
46
47
48
49
50
51
52
53
# Build for the minimal undefined behavior sanitizer runtime support library.

set(UBSAN_MINIMAL_SOURCES
  ubsan_minimal_handlers.cc
  )

include_directories(..)

set(UBSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
append_rtti_flag(OFF UBSAN_CFLAGS)

set(UBSAN_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS})

set(UBSAN_DYNAMIC_LIBS ${SANITIZER_COMMON_LINK_LIBS})

add_compiler_rt_component(ubsan-minimal)

# Common parts of minimal UBSan runtime.
add_compiler_rt_object_libraries(RTUbsan_minimal
  OS ${SANITIZER_COMMON_SUPPORTED_OS}
  ARCHS ${UBSAN_COMMON_SUPPORTED_ARCH}
  SOURCES ${UBSAN_MINIMAL_SOURCES} CFLAGS ${UBSAN_CFLAGS})


if(COMPILER_RT_HAS_UBSAN_MINIMAL)
  # Standalone minimal UBSan runtimes.
  add_compiler_rt_runtime(clang_rt.ubsan_minimal
    STATIC
    OS ${SANITIZER_COMMON_SUPPORTED_OS}
    ARCHS ${UBSAN_SUPPORTED_ARCH}
    OBJECT_LIBS RTUbsan_minimal
    CFLAGS ${UBSAN_CFLAGS}
    PARENT_TARGET ubsan-minimal)

  add_compiler_rt_runtime(clang_rt.ubsan_minimal
    SHARED
    OS ${SANITIZER_COMMON_SUPPORTED_OS}
    ARCHS ${UBSAN_SUPPORTED_ARCH}
    OBJECT_LIBS RTUbsan_minimal
    CFLAGS ${UBSAN_CFLAGS}
    LINK_FLAGS ${UBSAN_LINK_FLAGS}
    LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
    PARENT_TARGET ubsan-minimal)

  if (SANITIZER_USE_SYMBOLS AND NOT APPLE)
    set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
    list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
    add_sanitizer_rt_symbols(clang_rt.ubsan_minimal
      ARCHS ${ARCHS_FOR_SYMBOLS}
      PARENT_TARGET ubsan-minimal
      EXTRA ubsan.syms.extra)
  endif()
endif()