From 6f131ee4c6e2681683167c6a96c17225f5b17885 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Fri, 13 Dec 2024 14:46:50 -0800 Subject: [PATCH] build mimalloc as debug Signed-off-by: Jade Abraham --- third-party/mimalloc/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/third-party/mimalloc/Makefile b/third-party/mimalloc/Makefile index 13c20781b926..5b732db02605 100644 --- a/third-party/mimalloc/Makefile +++ b/third-party/mimalloc/Makefile @@ -18,7 +18,14 @@ CHPL_MIMALLOC_CFG_OPTIONS += \ ifeq ($(strip $(CHPL_MAKE_HOST_TARGET)),--host) CHPL_MIMALLOC_CFG_OPTIONS += -DMI_BUILD_SHARED=ON -DMI_BUILD_STATIC=ON else -CHPL_MIMALLOC_CFG_OPTIONS += -DMI_BUILD_SHARED=OFF -DMI_BUILD_STATIC=ON +CHPL_MIMALLOC_CFG_OPTIONS += -DMI_BUILD_SHARED=OFF -DMI_BUILD_STATIC=ON -DMI_OVERRIDE=OFF +endif + +# if DEBUG, build with debug info +ifeq ($(DEBUG),1) +CHPL_MIMALLOC_CFG_OPTIONS += -DCMAKE_BUILD_TYPE=Debug +else +CHPL_MIMALLOC_CFG_OPTIONS += -DCMAKE_BUILD_TYPE=Release endif