simplify heap checker building default to be Linux-only

This also fixes cmake and freebsd where previously check for freebsd
wasn't working.
This commit is contained in:
Aliaksey Kandratsenka 2023-06-21 10:39:25 -04:00
parent b58cbd2e23
commit b7e47a77c0
2 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ set(TCMALLOC_AND_PROFILER_SO_VERSION 10.5.6)
# target system supports. # target system supports.
set(DEFAULT_BUILD_CPU_PROFILER ON) set(DEFAULT_BUILD_CPU_PROFILER ON)
set(DEFAULT_BUILD_HEAP_PROFILER ON) set(DEFAULT_BUILD_HEAP_PROFILER ON)
set(DEFAULT_BUILD_HEAP_CHECKER ON) set(DEFAULT_BUILD_HEAP_CHECKER OFF)
set(DEFAULT_BUILD_DEBUGALLOC ON) set(DEFAULT_BUILD_DEBUGALLOC ON)
set(DEFAULT_BUILD_MINIMAL OFF) set(DEFAULT_BUILD_MINIMAL OFF)
@ -35,12 +35,12 @@ if(MINGW OR MSVC)
set(DEFAULT_BUILD_DEBUGALLOC OFF) set(DEFAULT_BUILD_DEBUGALLOC OFF)
set(NEED_NANOSLEEP OFF) set(NEED_NANOSLEEP OFF)
elseif(CYGWIN) elseif(CYGWIN)
set(DEFAULT_BUILD_HEAP_CHECKER OFF)
set(DEFAULT_BUILD_CPU_PROFILER OFF) set(DEFAULT_BUILD_CPU_PROFILER OFF)
elseif(HOST MATCHES "freebsd") endif()
set(DEFAULT_BUILD_HEAP_CHECKER OFF)
elseif(APPLE) # Heap checker is Linux-only (and deprecated).
set(DEFAULT_BUILD_HEAP_CHECKER OFF) if(CMAKE_SYSTEM MATCHES Linux)
set(DEFAULT_BUILD_HEAP_CHECKER ON)
endif() endif()
include(CheckCCompilerFlag) include(CheckCCompilerFlag)

View File

@ -42,7 +42,8 @@ AX_GENERATE_CHANGELOG
# target system supports. # target system supports.
default_enable_cpu_profiler=yes default_enable_cpu_profiler=yes
default_enable_heap_profiler=yes default_enable_heap_profiler=yes
default_enable_heap_checker=yes # heap checker is in practice Linux-only.
default_enable_heap_checker=no
default_enable_debugalloc=yes default_enable_debugalloc=yes
default_enable_minimal=no default_enable_minimal=no
default_tcmalloc_alignment=16 default_tcmalloc_alignment=16
@ -50,9 +51,8 @@ need_nanosleep=yes # Used later, to decide if to run ACX_NANOSLEEP
case "$host" in case "$host" in
*-mingw*) default_enable_minimal=yes; default_enable_debugalloc=no; *-mingw*) default_enable_minimal=yes; default_enable_debugalloc=no;
need_nanosleep=no;; need_nanosleep=no;;
*-cygwin*) default_enable_heap_checker=no; default_enable_cpu_profiler=no;; *-cygwin*) default_enable_cpu_profiler=no;;
*-freebsd*) default_enable_heap_checker=no;; *-linux*) default_enable_heap_checker=yes;;
*-darwin*) default_enable_heap_checker=no;;
esac esac
# Currently only backtrace works on s390 and OSX. # Currently only backtrace works on s390 and OSX.