[compiler-rt] r254818 - [CMake] Add COMPILER_RT_TSAN_DEBUG_OUTPUT option.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 17:37:17 PST 2015


Author: samsonov
Date: Fri Dec  4 19:37:17 2015
New Revision: 254818

URL: http://llvm.org/viewvc/llvm-project?rev=254818&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/lib/tsan/CMakeLists.txt

Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=254818&r1=254817&r2=254818&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Fri Dec  4 19:37:17 2015
@@ -8,6 +8,13 @@ set(TSAN_CFLAGS ${SANITIZER_COMMON_CFLAG
 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




More information about the llvm-commits mailing list