Skip to content

Commit e465d25

Browse files
committed
move mimalloc options
1 parent 5447eb3 commit e465d25

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmake/conan.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ if(SILKWORM_SANITIZE_COMPILER_OPTIONS)
9494
# cmake-format: on
9595
endif()
9696

97+
if(SILKWORM_USE_MIMALLOC)
98+
# Do not use mimalloc override on sanitizer builds (https://github.com/microsoft/mimalloc/issues/317#issuecomment-708506405)
99+
# Moreover, mimalloc override causes a crash on macOS at startup in rpcdaemon, so we just enable it on Linux
100+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT SILKWORM_SANITIZE)
101+
list(APPEND CONAN_OPTIONS "mimalloc:override=True")
102+
endif()
103+
endif()
104+
97105
conan_cmake_install(
98106
PATH_OR_REFERENCE "${CONAN_BINARY_DIR}"
99107
INSTALL_FOLDER "${CONAN_BINARY_DIR}"

conanfile.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ def configure(self):
5858
if self.settings.os == 'Windows':
5959
return
6060

61-
# mimalloc override=True causes a crash on macOS at startup in rpcdaemon, so we just enable it on Linux
62-
if self.settings.os == 'Linux':
63-
self.options['mimalloc'].override = True
64-
6561
# Disable Catch2 version 3.x.x signaling handling on WASM
6662
if self.settings.arch == 'wasm':
6763
self.options['catch2'].no_posix_signals = True

0 commit comments

Comments
 (0)