Skip to content

Commit 4616c82

Browse files
Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror)
1 parent 7e319d6 commit 4616c82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ if test "x$enable_werror" = "xyes"; then
241241
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
242242
fi
243243
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
244+
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]])
244245
fi
245246

246247
if test "x$CXXFLAGS_overridden" = "xno"; then
@@ -249,6 +250,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
249250
AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
250251
AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
251252
AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
253+
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[CXXFLAGS="$CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
252254

253255
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
254256
## unknown options if any other warning is produced. Test the -Wfoo case, and

0 commit comments

Comments
 (0)