]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Disable jemalloc on sanitized builds
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Nov 2019 15:15:52 +0000 (15:15 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Nov 2019 15:15:52 +0000 (15:15 +0000)
CMakeLists.txt
cmake/Sanitizer.cmake

index 49bc4474271450b4138987064e98a1a9e3eaded2..39a177310297ef81d1a42216fef0c231bb711d41 100644 (file)
@@ -148,7 +148,7 @@ ELSE(ENABLE_LUAJIT MATCHES "ON")
        ENDIF(NOT LUA_FOUND)
 ENDIF(ENABLE_LUAJIT MATCHES "ON")
 
-IF(ENABLE_JEMALLOC MATCHES "ON")
+IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE)
        ProcessPackage(JEMALLOC LIBRARY jemalloc_pic jemalloc INCLUDE jemalloc.h INCLUDE_SUFFIXES include/jemalloc
                ROOT ${JEMALLOC_ROOT_DIR})
        SET(WITH_JEMALLOC "1")
index 73d72da8d25cf1941f2c13968ab3e865a2161a6a..fc96fec8e313093e93265cb9f2a6ca7bd0449280 100644 (file)
@@ -11,6 +11,7 @@ endif ()
 if (SANITIZE)
     if (ENABLE_JEMALLOC MATCHES "ON")
         message (STATUS "Jemalloc support is useless in case of build with sanitizers")
+        set (ENABLE_JEMALLOC "OFF")
     endif ()
     if (SANITIZE STREQUAL "address")
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope")