From 07d54a9ba84b9905e6a8fbf65e97ebd175a1c29a Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 24 Nov 2024 11:59:39 +0100 Subject: [PATCH] [mimalloc] Disable assertions in emmalloc backend --- tools/system_libs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/system_libs.py b/tools/system_libs.py index 9c99272dd63e8..940a07e3b3bd6 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -1792,6 +1792,9 @@ class libmimalloc(MTLibrary): cflags = [ '-fno-builtin', + '-Wno-unused-function', + '-Wno-unused-but-set-variable', + '-Wno-unused-variable', '-Wno-deprecated-pragma', # build emmalloc as only a system allocator, without exporting itself onto # malloc/free in the global scope @@ -1800,6 +1803,8 @@ class libmimalloc(MTLibrary): '-DMI_MALLOC_OVERRIDE', # TODO: add build modes that include debug checks 1,2,3 '-DMI_DEBUG=0', + # disable `assert()` in the underlying emmalloc allocator + '-DNDEBUG', ] # malloc/free/calloc are runtime functions and can be generated during LTO