Skip to content

Commit

Permalink
Merge pull request rui314#349 from dmantipov/use-explicit-mimalloc-ne…
Browse files Browse the repository at this point in the history
…w-delete-overrides-if-system-mimalloc

Use explicit mimalloc new/delete overrides if SYSTEM_MIMALLOC
  • Loading branch information
rui314 authored Feb 17, 2022
2 parents b57da54 + 630b262 commit fcb2816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ endif

ifeq ($(USE_MIMALLOC), 1)
ifdef SYSTEM_MIMALLOC
MOLD_CXXFLAGS += -DSYSTEM_MIMALLOC=1
MOLD_LDFLAGS += -lmimalloc
else
MIMALLOC_LIB = out/mimalloc/libmimalloc.a
Expand Down
4 changes: 4 additions & 0 deletions main.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(SYSTEM_MIMALLOC)
#include <mimalloc-new-delete.h>
#endif

#include "elf/mold.h"
#include "macho/mold.h"

Expand Down

0 comments on commit fcb2816

Please sign in to comment.