summaryrefslogtreecommitdiff
path: root/lib/tsan/dd/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-07-25 23:38:25 +0000
committerPetr Hosek <phosek@chromium.org>2017-07-25 23:38:25 +0000
commitfd63314d6770e0da62572a3fea2c41c4cc0fc58a (patch)
tree9c3600f45b806aafae26485cc388c30e30cec72e /lib/tsan/dd/CMakeLists.txt
parent5d89c4be98863f7456a8c2c1936d768cc55f5c66 (diff)
[sanitizer] Support compiler-rt builtins
This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/dd/CMakeLists.txt')
-rw-r--r--lib/tsan/dd/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tsan/dd/CMakeLists.txt b/lib/tsan/dd/CMakeLists.txt
index bcff35f20..bd9515567 100644
--- a/lib/tsan/dd/CMakeLists.txt
+++ b/lib/tsan/dd/CMakeLists.txt
@@ -10,10 +10,12 @@ set(DD_SOURCES
dd_interceptors.cc
)
-set(DD_LINKLIBS)
+set(DD_LINKLIBS ${SANITIZER_COMMON_LINK_LIBS})
+
append_list_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)
append_list_if(COMPILER_RT_HAS_LIBRT rt DD_LINKLIBS)
append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread DD_LINKLIBS)
+append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ DD_LINKLIBS)
add_custom_target(dd)
# Deadlock detector is currently supported on 64-bit Linux only.
@@ -40,6 +42,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID)
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
+ LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS}
LINK_LIBS ${DD_LINKLIBS}
PARENT_TARGET dd)
endif()