diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2015-12-05 01:37:17 +0000 |
|---|---|---|
| committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-12-05 01:37:17 +0000 |
| commit | a330293af79489abd0e90482794bdf4f0718a323 (patch) | |
| tree | 0671045c92be4445f0ec680b30d91db75fe4f561 | |
| parent | 4b971e44636dc5396b8cf4d7c2c24fa4ce66c009 (diff) | |
| download | bcm5719-llvm-a330293af79489abd0e90482794bdf4f0718a323.tar.gz bcm5719-llvm-a330293af79489abd0e90482794bdf4f0718a323.zip | |
[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.
llvm-svn: 254818
| -rw-r--r-- | compiler-rt/lib/tsan/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt index 5830fdda218..34f6e30dee6 100644 --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/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 |

