diff options
Diffstat (limited to 'auto')
-rw-r--r-- | auto/cc/test | 2 | ||||
-rw-r--r-- | auto/make | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/auto/cc/test b/auto/cc/test index 5bd94d2f..4d6d5a43 100644 --- a/auto/cc/test +++ b/auto/cc/test @@ -71,7 +71,6 @@ case $NXT_CC_NAME in #NXT_CFLAGS="$NXT_CFLAGS -std=gnu99" NXT_CFLAGS="$NXT_CFLAGS -O" - #NXT_CFLAGS="$NXT_CFLAGS -O0" NXT_CFLAGS="$NXT_CFLAGS -Wall -Wextra" #NXT_CFLAGS="$NXT_CFLAGS -Wunused-result" @@ -112,7 +111,6 @@ case $NXT_CC_NAME in NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow" NXT_CFLAGS="$NXT_CFLAGS -O" - #NXT_CFLAGS="$NXT_CFLAGS -O0" NXT_CFLAGS="$NXT_CFLAGS -Wall -Wextra" #NXT_CFLAGS="$NXT_CFLAGS -Wunused-result" @@ -52,6 +52,17 @@ ifeq (\$V,1) v := endif +# Optionally enable debugging builds with +# make D=1 ... +# -g is always used, this just changes the optimisation level. +# On GCC this would be -Og, however according to the clang(1) +# man page, -O0 'generates the most debuggable code'. +D := 0 + +ifeq (\$D,1) + CFLAGS += -O0 +endif + END fi |