[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / compiler-rt / lib / cfi / CMakeLists.txt
blob2197fa4a5c758d8da9c856ba7a6bbfd83556a6d3
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   # Too many existing bugs, needs cleanup.
15   append_list_if(COMPILER_RT_HAS_WNO_FORMAT -Wno-format CFI_CFLAGS)
17   set(CFI_DIAG_CFLAGS
18     -DCFI_ENABLE_DIAG=1
19   )
21   foreach(arch ${CFI_SUPPORTED_ARCH})
22     add_compiler_rt_runtime(clang_rt.cfi
23       STATIC
24       ARCHS ${arch}
25       SOURCES ${CFI_SOURCES}
26       OBJECT_LIBS RTInterception
27                   RTSanitizerCommon
28                   RTSanitizerCommonLibc
29       CFLAGS ${CFI_CFLAGS}
30       PARENT_TARGET cfi)
31     add_compiler_rt_runtime(clang_rt.cfi_diag
32       STATIC
33       ARCHS ${arch}
34       SOURCES ${CFI_SOURCES}
35       OBJECT_LIBS RTInterception
36                   RTSanitizerCommon
37                   RTSanitizerCommonLibc
38                   RTSanitizerCommonCoverage
39                   RTSanitizerCommonSymbolizer
40                   RTUbsan
41       CFLAGS ${CFI_CFLAGS} ${CFI_DIAG_CFLAGS}
42       PARENT_TARGET cfi)
43   endforeach()
44 endif()
46 add_compiler_rt_resource_file(cfi_ignorelist cfi_ignorelist.txt cfi)