summaryrefslogtreecommitdiff
path: root/lib/tsan/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-29 12:08:36 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-29 12:08:36 +0000
commit0bc4a0b9c7cae94e4a1d50a77a53cb92781b46c5 (patch)
tree4aaaa535fd65f432df67a1c38aa2928094cbf493 /lib/tsan/CMakeLists.txt
parentd9760ab05f99451ffe7528a3e03e98ab67e09383 (diff)
[TSan] Add a couple of compiler warnings to TSan runtime compile flags
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/CMakeLists.txt')
-rw-r--r--lib/tsan/CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt
index 7638ec810..fc1944b02 100644
--- a/lib/tsan/CMakeLists.txt
+++ b/lib/tsan/CMakeLists.txt
@@ -8,10 +8,14 @@ set(TSAN_CFLAGS
${SANITIZER_COMMON_CFLAGS}
-fPIE
-fno-rtti)
-# FIXME: Add support for compile flags:
-# -Wframe-larger-than=512,
-# -Wglobal-constructors,
-# --sysroot=.
+
+set(TSAN_RTL_CFLAGS
+ ${TSAN_CFLAGS}
+ -Wframe-larger-than=512)
+if(SUPPORTS_GLOBAL_CONSTRUCTORS_FLAG)
+ list(APPEND TSAN_RTL_CFLAGS -Wglobal-constructors)
+endif()
+# FIXME: Add support for --sysroot=. compile flag:
if("${CMAKE_BUILD_TYPE}" EQUAL "Release")
set(TSAN_COMMON_DEFINITIONS DEBUG=0)
@@ -64,7 +68,7 @@ if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE)
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
- CFLAGS ${TSAN_CFLAGS}
+ CFLAGS ${TSAN_RTL_CFLAGS}
DEFS ${TSAN_COMMON_DEFINITIONS})
add_sanitizer_rt_symbols(clang_rt.tsan-${arch} rtl/tsan.syms.extra)
list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch}