summaryrefslogtreecommitdiff
path: root/lib/tsan/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-12-05 01:37:17 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-12-05 01:37:17 +0000
commitdfe157f72e20c613afa2bac13815c5ca13a780d2 (patch)
treefa201dffa6bb5908e414d408657b2acfca6eab2a /lib/tsan/CMakeLists.txt
parent5e84f7b74ff8d7f836f5d3fd1e07e8834002f18b (diff)
downloadcompiler-rt-dfe157f72e20c613afa2bac13815c5ca13a780d2.tar.gz
[CMake] Add COMPILER_RT_TSAN_DEBUG_OUTPUT option.
This option builds TSan runtime with extra debug printfs and stats collection. This build configuration is developer-only and should rarely be used, but we need to keep it to make sure it doesn't bitrot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/CMakeLists.txt')
-rw-r--r--lib/tsan/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt
index 5830fdda2..34f6e30de 100644
--- a/lib/tsan/CMakeLists.txt
+++ b/lib/tsan/CMakeLists.txt
@@ -8,6 +8,13 @@ set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE TSAN_CFLAGS)
append_no_rtti_flag(TSAN_CFLAGS)
+if(COMPILER_RT_TSAN_DEBUG_OUTPUT)
+ # Add extra debug information to TSan runtime. This configuration is rarely
+ # used, but we need to support it so that debug output will not bitrot.
+ list(APPEND TSAN_CFLAGS -DTSAN_COLLECT_STATS=1
+ -DTSAN_DEBUG_OUTPUT=2)
+endif()
+
set(TSAN_RTL_CFLAGS ${TSAN_CFLAGS})
append_list_if(COMPILER_RT_HAS_MSSE3_FLAG -msse3 TSAN_RTL_CFLAGS)
append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=512