mirror of
https://github.com/gperftools/gperftools
synced 2025-01-02 04:32:03 +00:00
enable -Wthread-safety for clang
This commit is contained in:
parent
2d35232cfa
commit
21e66f807c
@ -28,6 +28,10 @@ if HAVE_SIZED_DEALLOCATION
|
||||
AM_CXXFLAGS += -fsized-deallocation
|
||||
endif HAVE_SIZED_DEALLOCATION
|
||||
|
||||
if ENABLE_W_THREAD_SAFETY
|
||||
AM_CXXFLAGS += -Wthread-safety
|
||||
endif ENABLE_W_THREAD_SAFETY
|
||||
|
||||
# The -no-undefined flag allows libtool to generate shared libraries for
|
||||
# Cygwin and MinGW.
|
||||
AM_LDFLAGS = -no-undefined
|
||||
|
13
configure.ac
13
configure.ac
@ -234,6 +234,19 @@ AC_CACHE_CHECK(
|
||||
CXXFLAGS="$OLD_CXXFLAGS"])
|
||||
AM_CONDITIONAL(ENABLE_FP_FLAGS, [test "x$ac_cv_frame_pointer_cflags" = "xyes"])
|
||||
|
||||
# Clang-only (so far?) -Wthread-safety is a useful thing. We want.
|
||||
AC_CACHE_CHECK(
|
||||
[compiler and target supports -Wthread-safety],
|
||||
[ac_cv_w_thread_safety],
|
||||
[OLD_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -Wthread-safety"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [])],
|
||||
[ac_cv_w_thread_safety=yes],
|
||||
[ac_cv_w_thread_safety=no])
|
||||
CXXFLAGS="$OLD_CXXFLAGS"])
|
||||
AM_CONDITIONAL(ENABLE_W_THREAD_SAFETY, [test "x$ac_cv_w_thread_safety" = "xyes"])
|
||||
|
||||
AX_C___ATTRIBUTE__
|
||||
|
||||
AC_MSG_CHECKING(for __attribute__((aligned(N))) on functions)
|
||||
|
Loading…
Reference in New Issue
Block a user