[PATCH] D107491: sanitizer_common: disable thread safety annotations for googletest
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 11:04:42 PDT 2021
dim updated this revision to Diff 364554.
dim added a comment.
Fix typo.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107491/new/
https://reviews.llvm.org/D107491
Files:
compiler-rt/CMakeLists.txt
Index: compiler-rt/CMakeLists.txt
===================================================================
--- compiler-rt/CMakeLists.txt
+++ compiler-rt/CMakeLists.txt
@@ -546,6 +546,14 @@
-I${COMPILER_RT_GTEST_PATH}/include
-I${COMPILER_RT_GTEST_PATH}
)
+if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ # FreeBSD has its pthread functions marked with thread safety annotations, but
+ # googletest is not compatible with such annotations. Disable the thread
+ # safety warnings-as-errors until googletest has been fixed.
+ list(APPEND NO_THREAD_SAFETY_FLAGS ${THREAD_SAFETY_FLAGS})
+ list(TRANSFORM NO_THREAD_SAFETY_FLAGS REPLACE "error=" "no-")
+ list(APPEND COMPILER_RT_GTEST_CFLAGS ${NO_THREAD_SAFETY_FLAGS})
+endif()
# Mocking support.
set(COMPILER_RT_GMOCK_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107491.364554.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210805/2302726b/attachment.bin>
More information about the llvm-commits
mailing list