Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / lib / stats / CMakeLists.txt
blob60c02556f80d615436b510f823c72d36ced4447f
1 set(STATS_HEADERS
2   stats.h)
4 include_directories(..)
6 add_custom_target(stats)
7 set_target_properties(stats PROPERTIES FOLDER "Compiler-RT Misc")
9 if(APPLE)
10   set(STATS_LIB_FLAVOR SHARED)
12   set(STATS_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
14   add_weak_symbols("asan" WEAK_SYMBOL_LINK_FLAGS)
15   add_weak_symbols("ubsan" WEAK_SYMBOL_LINK_FLAGS)
16   add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS)
17 else()
18   set(STATS_LIB_FLAVOR STATIC)
20   set(WEAK_SYMBOL_LINK_FLAGS)
21 endif()
23 add_compiler_rt_runtime(clang_rt.stats
24   ${STATS_LIB_FLAVOR}
25   ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
26   OS ${STATS_SUPPORTED_OS}
27   SOURCES stats.cpp
28   ADDITIONAL_HEADERS ${STATS_HEADERS}
29   OBJECT_LIBS RTSanitizerCommon
30               RTSanitizerCommonLibc
31               RTSanitizerCommonSymbolizer
32   CFLAGS ${SANITIZER_COMMON_CFLAGS}
33   LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS} ${WEAK_SYMBOL_LINK_FLAGS}
34   LINK_LIBS ${STATS_LINK_LIBS}
35   PARENT_TARGET stats)
37 add_compiler_rt_runtime(clang_rt.stats_client
38   STATIC
39   ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
40   OS ${STATS_SUPPORTED_OS}
41   SOURCES stats_client.cpp
42   ADDITIONAL_HEADERS ${STATS_HEADERS}
43   CFLAGS ${SANITIZER_COMMON_CFLAGS}
44   LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
45   PARENT_TARGET stats)