diff --git a/compiler-rt/lib/tsan/tests/CMakeLists.txt b/compiler-rt/lib/tsan/tests/CMakeLists.txt index 5d27e134555ac..56a4278f363cb 100644 --- a/compiler-rt/lib/tsan/tests/CMakeLists.txt +++ b/compiler-rt/lib/tsan/tests/CMakeLists.txt @@ -14,6 +14,12 @@ set(TSAN_UNITTEST_CFLAGS -fno-rtti ) +if(COMPILER_RT_TSAN_DEBUG_OUTPUT) + # Need to match these flags with the runtime. + list(APPEND TSAN_UNITTEST_CFLAGS -DTSAN_COLLECT_STATS=1 + -DTSAN_DEBUG_OUTPUT=2) +endif() + set(TSAN_TEST_ARCH ${TSAN_SUPPORTED_ARCH}) set(LINK_FLAGS ${COMPILER_RT_UNITTEST_LINK_FLAGS})