tsan: fix build with COMPILER_RT_TSAN_DEBUG_OUTPUT
authorDmitry Vyukov <dvyukov@google.com>
Tue, 27 Apr 2021 18:19:28 +0000 (20:19 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 27 Apr 2021 20:38:56 +0000 (22:38 +0200)
commitf69853ac40ba1b8cd119fc49091cb7216da81b38
treeafde1677bb98e6875bf91f4646d2355dab0c6c3e
parente1021dd1fdfebff77cfb205892ada6b6a900865f
tsan: fix build with COMPILER_RT_TSAN_DEBUG_OUTPUT

COMPILER_RT_TSAN_DEBUG_OUTPUT enables TSAN_COLLECT_STATS,
which changes layout of runtime structs (some structs contain
stats when the option is enabled).
It's not OK to build runtime with the define, but tests without it.
The error is detected by build_consistency_stats/nostats.
Fix this by defining TSAN_COLLECT_STATS for tests to match the runtime.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D101386
compiler-rt/lib/tsan/tests/CMakeLists.txt