[DominatorTree] Add support for mixed pre/post CFG views.
[llvm-project.git] / compiler-rt / lib / cfi / CMakeLists.txt
blob9a641d33ac48341b77c3a7842f05e8e50cc0eedf
1 add_compiler_rt_component(cfi)
3 if(OS_NAME MATCHES "Linux" OR OS_NAME MATCHES "FreeBSD" OR OS_NAME MATCHES "NetBSD")
4   set(CFI_SOURCES
5     cfi.cpp
6     )
8   include_directories(..)
10   set(CFI_CFLAGS
11     ${SANITIZER_COMMON_CFLAGS}
12   )
14   set(CFI_DIAG_CFLAGS
15     -DCFI_ENABLE_DIAG=1
16   )
18   foreach(arch ${CFI_SUPPORTED_ARCH})
19     add_compiler_rt_runtime(clang_rt.cfi
20       STATIC
21       ARCHS ${arch}
22       SOURCES ${CFI_SOURCES}
23       OBJECT_LIBS RTInterception
24                   RTSanitizerCommon
25                   RTSanitizerCommonLibc
26       CFLAGS ${CFI_CFLAGS}
27       PARENT_TARGET cfi)
28     add_compiler_rt_runtime(clang_rt.cfi_diag
29       STATIC
30       ARCHS ${arch}
31       SOURCES ${CFI_SOURCES}
32       OBJECT_LIBS RTInterception
33                   RTSanitizerCommon
34                   RTSanitizerCommonLibc
35                   RTSanitizerCommonCoverage
36                   RTSanitizerCommonSymbolizer
37                   RTUbsan
38       CFLAGS ${CFI_CFLAGS} ${CFI_DIAG_CFLAGS}
39       PARENT_TARGET cfi)
40   endforeach()
41 endif()
43 add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt cfi)