aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsan/CMakeLists.txt')
-rw-r--r--lib/tsan/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt
index b26a884b1a4c..75d26349ae30 100644
--- a/lib/tsan/CMakeLists.txt
+++ b/lib/tsan/CMakeLists.txt
@@ -107,6 +107,10 @@ if(APPLE)
# Pass ASM file directly to the C++ compiler.
set_source_files_properties(${TSAN_ASM_SOURCES} PROPERTIES LANGUAGE C)
endif()
+
+ add_weak_symbols("ubsan" WEAK_SYMBOL_LINKFLAGS)
+ add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS)
+
add_compiler_rt_runtime(clang_rt.tsan
SHARED
OS ${TSAN_SUPPORTED_OS}
@@ -117,6 +121,7 @@ if(APPLE)
RTSanitizerCommonLibc
RTUbsan
CFLAGS ${TSAN_RTL_CFLAGS}
+ LINKFLAGS ${WEAK_SYMBOL_LINKFLAGS}
PARENT_TARGET tsan)
add_compiler_rt_object_libraries(RTTsan_dynamic
OS ${TSAN_SUPPORTED_OS}