diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -368,6 +368,8 @@ list(APPEND SANITIZER_COMMON_CFLAGS ${THREAD_SAFETY_FLAGS}) string(REPLACE ";" " " thread_safety_flags_space_sep "${THREAD_SAFETY_FLAGS}") string(APPEND COMPILER_RT_TEST_COMPILER_CFLAGS " ${thread_safety_flags_space_sep}") + list(APPEND NO_THREAD_SAFETY_FLAGS ${THREAD_SAFETY_FLAGS}) + list(TRANSFORM NO_THREAD_SAFETY_FLAGS REPLACE "error=" "no-") endif() # If we're using MSVC, @@ -536,6 +538,7 @@ -DGTEST_HAS_RTTI=0 -I${COMPILER_RT_GTEST_PATH}/include -I${COMPILER_RT_GTEST_PATH} + ${NO_THREAD_SAFETY_FLAGS} ) # Mocking support.