mirror of
https://github.com/gperftools/gperftools
synced 2024-12-22 07:20:01 +00:00
test that sized deallocation really works before enabling it
Weirdly, some OSX compiler does allow -fsized-deallocation, yet barks on any attempt to actually use it at compile time (!). So lets detect this as well in configure and opt out as necessary. Should fix issue #870.
This commit is contained in:
parent
5618ef7850
commit
98753aa737
@ -358,9 +358,11 @@ AC_CACHE_CHECK([if C++ compiler supports -fsized-deallocation],
|
||||
[AC_LANG_PUSH(C++)
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fsized-deallocation"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)],
|
||||
perftools_cv_sized_deallocation_result=yes,
|
||||
perftools_cv_sized_deallocation_result=no)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <new>]],
|
||||
[[(::operator delete)(0, 256)]])],
|
||||
perftools_cv_sized_deallocation_result=yes,
|
||||
perftools_cv_sized_deallocation_result=no)
|
||||
CXXFLAGS="$OLD_CXXFLAGS"
|
||||
AC_LANG_POP(C++)])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user