2018-07-10 21:00:17 +08:00
|
|
|
set(STATS_HEADERS
|
|
|
|
stats.h)
|
|
|
|
|
2016-01-16 08:31:29 +08:00
|
|
|
include_directories(..)
|
|
|
|
|
|
|
|
add_custom_target(stats)
|
2016-07-12 05:51:56 +08:00
|
|
|
set_target_properties(stats PROPERTIES FOLDER "Compiler-RT Misc")
|
2016-01-16 08:31:29 +08:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
set(STATS_LIB_FLAVOR SHARED)
|
2017-01-09 11:51:42 +08:00
|
|
|
|
2017-07-28 11:39:38 +08:00
|
|
|
set(STATS_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
|
|
|
|
|
2017-01-10 12:33:04 +08:00
|
|
|
add_weak_symbols("asan" WEAK_SYMBOL_LINK_FLAGS)
|
|
|
|
add_weak_symbols("ubsan" WEAK_SYMBOL_LINK_FLAGS)
|
|
|
|
add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS)
|
2016-01-16 08:31:29 +08:00
|
|
|
else()
|
|
|
|
set(STATS_LIB_FLAVOR STATIC)
|
2017-01-09 11:51:42 +08:00
|
|
|
|
2017-01-10 12:33:04 +08:00
|
|
|
set(WEAK_SYMBOL_LINK_FLAGS)
|
2016-01-16 08:31:29 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_compiler_rt_runtime(clang_rt.stats
|
|
|
|
${STATS_LIB_FLAVOR}
|
|
|
|
ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
|
2021-11-09 09:19:57 +08:00
|
|
|
OS ${STATS_SUPPORTED_OS}
|
2019-08-01 20:41:23 +08:00
|
|
|
SOURCES stats.cpp
|
2018-07-10 21:00:17 +08:00
|
|
|
ADDITIONAL_HEADERS ${STATS_HEADERS}
|
2016-01-16 08:31:29 +08:00
|
|
|
OBJECT_LIBS RTSanitizerCommon
|
|
|
|
RTSanitizerCommonLibc
|
2018-04-17 00:58:34 +08:00
|
|
|
RTSanitizerCommonSymbolizer
|
2016-01-16 08:31:29 +08:00
|
|
|
CFLAGS ${SANITIZER_COMMON_CFLAGS}
|
2017-07-28 11:39:38 +08:00
|
|
|
LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS} ${WEAK_SYMBOL_LINK_FLAGS}
|
|
|
|
LINK_LIBS ${STATS_LINK_LIBS}
|
2016-01-16 08:31:29 +08:00
|
|
|
PARENT_TARGET stats)
|
|
|
|
|
|
|
|
add_compiler_rt_runtime(clang_rt.stats_client
|
|
|
|
STATIC
|
|
|
|
ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
|
2021-11-09 09:19:57 +08:00
|
|
|
OS ${STATS_SUPPORTED_OS}
|
2019-08-01 20:41:23 +08:00
|
|
|
SOURCES stats_client.cpp
|
2018-07-10 21:00:17 +08:00
|
|
|
ADDITIONAL_HEADERS ${STATS_HEADERS}
|
2016-01-16 08:31:29 +08:00
|
|
|
CFLAGS ${SANITIZER_COMMON_CFLAGS}
|
2017-01-10 12:33:04 +08:00
|
|
|
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
|
2016-01-16 08:31:29 +08:00
|
|
|
PARENT_TARGET stats)
|