Skip to content

Commit d0a2dce

Browse files
authored
[mimalloc] Disable assertions in emmalloc backend (#23016)
1 parent f1dfaf3 commit d0a2dce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/system_libs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,9 @@ class libmimalloc(MTLibrary):
17921792

17931793
cflags = [
17941794
'-fno-builtin',
1795+
'-Wno-unused-function',
1796+
'-Wno-unused-but-set-variable',
1797+
'-Wno-unused-variable',
17951798
'-Wno-deprecated-pragma',
17961799
# build emmalloc as only a system allocator, without exporting itself onto
17971800
# malloc/free in the global scope
@@ -1800,6 +1803,8 @@ class libmimalloc(MTLibrary):
18001803
'-DMI_MALLOC_OVERRIDE',
18011804
# TODO: add build modes that include debug checks 1,2,3
18021805
'-DMI_DEBUG=0',
1806+
# disable `assert()` in the underlying emmalloc allocator
1807+
'-DNDEBUG',
18031808
]
18041809

18051810
# malloc/free/calloc are runtime functions and can be generated during LTO

0 commit comments

Comments
 (0)