aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-07-25 09:30:12 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-11-06 17:41:02 +0100
commit4616c825a4530042983186a3521a6bfe650b5b67 (patch)
tree79a6876b8b8b40106ccf077e621c728a08779e7e /configure.ac
parent7e319d63932c40730ee66110cd8edd14a312f297 (diff)
downloadbitcoin-4616c825a4530042983186a3521a6bfe650b5b67.tar.xz
Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 81c84a8af4..7c37204193 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,6 +241,7 @@ if test "x$enable_werror" = "xyes"; then
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
fi
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]])
fi
if test "x$CXXFLAGS_overridden" = "xno"; then
@@ -249,6 +250,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
AX_CHECK_COMPILE_FLAG([-Wformat],[CXXFLAGS="$CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wvla],[CXXFLAGS="$CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wformat-security],[CXXFLAGS="$CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[CXXFLAGS="$CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
## unknown options if any other warning is produced. Test the -Wfoo case, and