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-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}
|
|
|
|
OS ${SANITIZER_COMMON_SUPPORTED_OS}
|
|
|
|
SOURCES stats.cc
|
|
|
|
OBJECT_LIBS RTSanitizerCommon
|
|
|
|
RTSanitizerCommonLibc
|
|
|
|
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)
|
|
|
|
|
|
|
|
add_compiler_rt_runtime(clang_rt.stats_client
|
|
|
|
STATIC
|
|
|
|
ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
|
|
|
|
OS ${SANITIZER_COMMON_SUPPORTED_OS}
|
|
|
|
SOURCES stats_client.cc
|
|
|
|
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)
|