Skip to content

Commit 6d17c35

Browse files
committed
configure: Add --enable-debug-jemalloc
1 parent 1002155 commit 6d17c35

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

configure

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ opt_nosave optimize-llvm 1 "build optimized LLVM"
550550
opt_nosave llvm-assertions 0 "build LLVM with assertions"
551551
opt_nosave debug-assertions 0 "build with debugging assertions"
552552
opt_nosave debuginfo 0 "build with debugger metadata"
553+
opt_nosave debug-jemalloc 0 "build jemalloc with --enable-debug --enable-fill"
553554

554555
valopt localstatedir "/var/lib" "local state directory"
555556
valopt sysconfdir "/etc" "install system configuration files"
@@ -633,6 +634,7 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
633634
CFG_DISABLE_OPTIMIZE_LLVM=1
634635
CFG_ENABLE_LLVM_ASSERTIONS=1
635636
CFG_ENABLE_DEBUG_ASSERTIONS=1
637+
CFG_ENABLE_DEBUG_JEMALLOC=1
636638
fi
637639

638640
# OK, now write the debugging options
@@ -642,6 +644,7 @@ if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then putvar CFG_DISABLE_OPTIMIZE_LLVM; f
642644
if [ -n "$CFG_ENABLE_LLVM_ASSERTIONS" ]; then putvar CFG_ENABLE_LLVM_ASSERTIONS; fi
643645
if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTIONS; fi
644646
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
647+
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
645648

646649
# A magic value that allows the compiler to use unstable features
647650
# during the bootstrap even when doing so would normally be an error

mk/rt.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
143143
JEMALLOC_ARGS_$(1) := --disable-tls
144144
endif
145145

146+
ifdef CFG_ENABLE_DEBUG_JEMALLOC
147+
JEMALLOC_ARGS_$(1) += --enable-debug --enable-fill
148+
endif
149+
146150
################################################################################
147151
# jemalloc
148152
################################################################################

0 commit comments

Comments
 (0)