summaryrefslogtreecommitdiff
path: root/lib/tsan/dd
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-07-28 03:39:38 +0000
committerPetr Hosek <phosek@chromium.org>2017-07-28 03:39:38 +0000
commitd630c5dde1026eee0e5a1fb886791adf21ab95a6 (patch)
treed9521f5d3c1d37520280d14da296381d6ae837ec /lib/tsan/dd
parentab3ad40db18c65299f5c4dbcd0cec54a774e50cf (diff)
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@309361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/dd')
-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()