--- a/src/Makefile +++ b/src/Makefile @@ -72,10 +72,7 @@ PYTHON := $(shell which python3 || which python) endif # Default allocator defaults to Jemalloc on Linux and libc otherwise -MALLOC=libc -ifeq ($(uname_S),Linux) - MALLOC=jemalloc -endif +MALLOC?=jemalloc # To get ARM stack traces if Valkey crashes we need a special C flag. ifneq (,$(filter aarch64 armv%,$(uname_M))) @@ -330,9 +327,8 @@ ifeq ($(MALLOC),tcmalloc_minimal) endif ifeq ($(MALLOC),jemalloc) - DEPENDENCY_TARGETS+= jemalloc - FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include - FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS) + FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE + FINAL_LIBS+= -ljemalloc -ldl endif ifeq ($(USE_LTTNG),yes)