Allow tsan for gcc

Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
Pawel Cieslak
2020-11-27 10:53:28 +01:00
committed by Compute-Runtime-Automation
parent 068ee712d2
commit 83c8d0984d

View File

@@ -697,11 +697,11 @@ else()
endif()
endif()
if(USE_TSAN)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
if(CMAKE_COMPILER_IS_GNUCC AND USE_ASAN)
message(STATUS "Cannot use thread sanitization with address sanitization in gcc")
else()
set(TSAN_FLAGS " -fsanitize=thread -DSANITIZER_BUILD")
set(TSAN_LIBS "tsan")
else()
message(STATUS "Thread sanitization with gcc is not fully supported")
endif()
endif()