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