Skip to content

Commit

Permalink
[mimalloc] Disable assertions in emmalloc backend (emscripten-core#23016
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kleisauke authored Nov 26, 2024
1 parent f1dfaf3 commit d0a2dce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d0a2dce

Please sign in to comment.