forked from OSchip/llvm-project
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
This commit is contained in:
parent
e1021dd1fd
commit
f69853ac40
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue