Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to make libmimalloc also inherit from DebugLibrary, which would add a debug variation. But if we don't have a specific reason to want that, I guess it would be wasteful.

]

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