From c848ae4cda29a9ec9c449dbe000b13728ebfb020 Mon Sep 17 00:00:00 2001 From: Dave Cottlehuber Date: Mon, 22 Feb 2021 16:15:02 +0000 Subject: [PATCH] cmake: skip jemalloc on FreeBSD FreeBSD is the upstream for jemalloc so it's the system malloc already --- cmake/Jemalloc.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/Jemalloc.cmake b/cmake/Jemalloc.cmake index 503b8e36453..6dff173b93c 100644 --- a/cmake/Jemalloc.cmake +++ b/cmake/Jemalloc.cmake @@ -1,12 +1,13 @@ add_library(jemalloc INTERFACE) set(USE_JEMALLOC ON) -if(USE_SANITIZER OR WIN32) +# We don't want to use jemalloc on Windows +# Nor on FreeBSD, where jemalloc is the default system allocator +if(USE_SANITIZER OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")) set(USE_JEMALLOC OFF) return() endif() -# We don't want to use jemalloc on Windows find_path(JEMALLOC_INCLUDE_DIR NAMES jemalloc/jemalloc.h