From 529d74a28243fc82b5f8841f1173a264fa5e92bf Mon Sep 17 00:00:00 2001 From: daan Date: Wed, 22 Jul 2020 12:45:53 -0700 Subject: [PATCH] use O1 with thread sanitizer --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 711af552..0082c448 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,7 +137,7 @@ endif() if(MI_DEBUG_TSAN MATCHES "ON") if(CMAKE_C_COMPILER_ID MATCHES "Clang") message(STATUS "Build with thread sanitizer (MI_DEBUG_TSAN=ON)") - list(APPEND mi_cflags -fsanitize=thread -g) + list(APPEND mi_cflags -fsanitize=thread -g -O1) list(APPEND CMAKE_EXE_LINKER_FLAGS -fsanitize=thread) else() message(WARNING "Can only use thread sanitizer with clang (MI_DEBUG_TSAN=ON but ignored)")