diff --git a/src/Makefile b/src/Makefile index 0456990f3..9a3d065f8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -94,6 +94,7 @@ # NOSDLMAIN=1 - ? # SDLMAIN=1 - ? # USELTO=1 - Enable building with LTO. +# USEJEMALLOC=1 Enable building with jemalloc Allocator to replace GLibc malloc, might improve performance # # Library configuration flags: # Everything here is an override. @@ -279,6 +280,10 @@ opts+=-fsanitize=undefined libs+=-fsanitize=undefined endif +ifdef USEJEMALLOC +libs+=-ljemalloc +endif + ifneq (,$(filter $(CC) $(CXX),clang clang++)) libs+=-fuse-ld=lld endif