From 8097895d3df0be749389804cbf640d8d33bae93f Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Thu, 27 Aug 2020 14:43:22 +0000 Subject: [PATCH] Splitting debug and debug-memory configure options. --- auto/cc | 4 +++- auto/help | 2 ++ auto/options | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/auto/cc b/auto/cc index 3ffb64c2..02c04a7f 100644 --- a/auto/cc +++ b/auto/cc @@ -170,8 +170,10 @@ case $NJS_CC_NAME in esac if [ "$NJS_DEBUG" = "YES" ]; then - NJS_CC_OPT="$NJS_CC_OPT -O0" njs_define=NJS_DEBUG . auto/define +fi + +if [ "$NJS_DEBUG_MEMORY" = "YES" ]; then njs_define=NJS_DEBUG_MEMORY . auto/define fi diff --git a/auto/help b/auto/help index c9c307c1..ac20f7b3 100644 --- a/auto/help +++ b/auto/help @@ -16,6 +16,8 @@ default: "$NJS_LD_OPT" --debug=YES enables additional runtime checks, \ default: "$NJS_DEBUG" + --debug-memory=YES enables memory alloc debug, \ +default: "$NJS_DEBUG_MEMORY" --address-sanitizer=YES enables build with address sanitizer, \ default: "$NJS_ADDRESS_SANITIZER" END diff --git a/auto/options b/auto/options index a7495b82..021f7357 100644 --- a/auto/options +++ b/auto/options @@ -7,6 +7,7 @@ NJS_CC_OPT=${NJS_CC_OPT:--O} NJS_LD_OPT=${NJS_CC_OPT:--O} NJS_DEBUG=NO +NJS_DEBUG_MEMORY=NO NJS_ADDRESS_SANITIZER=NO NJS_CONFIGURE_OPTIONS= @@ -25,6 +26,7 @@ do --ar=*) AR="$value" ;; --debug=*) NJS_DEBUG="$value" ;; + --debug-memory=*) NJS_DEBUG_MEMORY="$value" ;; --address-sanitizer=*) NJS_ADDRESS_SANITIZER="$value" ;; --help) -- 2.47.3