From 387cc8f7a4355856c3d0ef1590e1e6f28ab72fc1 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 24 Sep 2018 09:04:37 +0200 Subject: [PATCH 1/1] Define HAVE_SANITIZER_THREAD. --- tools/cmake/GCCFlags.cmake | 3 +++ tools/cmake/src/internal_config.h.in | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/cmake/GCCFlags.cmake b/tools/cmake/GCCFlags.cmake index 2b51c858f6..e15cbdb37a 100644 --- a/tools/cmake/GCCFlags.cmake +++ b/tools/cmake/GCCFlags.cmake @@ -229,6 +229,9 @@ if(enable_thread_sanitizer) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -no-pie") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer -no-pie") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -fsanitize=thread -no-pie") + set(HAVE_SANITIZER_THREAD TRUE CACHE INTERNAL "") +else() + set(HAVE_SANITIZER_THREAD FALSE CACHE INTERNAL "") endif() if(enable_undefined_sanitizer) diff --git a/tools/cmake/src/internal_config.h.in b/tools/cmake/src/internal_config.h.in index ae696840ff..3b9e9f461b 100644 --- a/tools/cmake/src/internal_config.h.in +++ b/tools/cmake/src/internal_config.h.in @@ -25,6 +25,7 @@ #cmakedefine01 HAVE_VALGRIND_H /* Address Sanitizer */ +#cmakedefine01 HAVE_SANITIZER_THREAD #cmakedefine01 HAVE_SANITIZER_ADDRESS #cmakedefine01 HAVE_SANITIZER_ADDRESS_FIBER_SUPPORT -- 2.20.1