summaryrefslogtreecommitdiff
path: root/solenv/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-15 22:55:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-15 23:20:48 +0200
commit659c6a363bf84bd2520042ba80bc507763b57b78 (patch)
tree41079d20ca1d37959ee062eaabcf8cbc1bc3257d /solenv/inc
parent7a042c8204628c573fc52d5fb4e4a5ba650b1604 (diff)
Let --enable-assert-always-abort affect setting NDEBUG directly
For one, assert.h is designed to be includeable multiple times with changing NDEBUG settings, so it is not robust to include it early in sal/macros.h with "correct" NDEBUG settings and potentially include it again later. For another, there is #ifndef NDEBUG code providing functionality used exclusively within assert calls, which must be compiled with the same NDEBUG-setting as the relevant #include <assert.h>. Change-Id: I7b2f9c85f8e2155051274757c64162ed5a5e9d1b
Diffstat (limited to 'solenv/inc')
-rw-r--r--solenv/inc/settings.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index e24c0e6cd1d3..15bd3f0c7eb0 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -1074,10 +1074,13 @@ RSCDEFS+=-DDBG_UTIL
.ENDIF
.IF "$(product)"!=""
-CDEFS+= -DPRODUCT -DNDEBUG
-RSCDEFS+= -DPRODUCT
+CDEFS+= -DPRODUCT
+RSCDEFS+= -DPRODUCT
+.IF "$(ASSERT_ALWAYS_ABORT)"=="FALSE"
+CDEFS+=-DNDEBUG
RSCDEFS+= -DNDEBUG
.ENDIF
+.ENDIF
.IF "$(DBG_LEVEL)"!=""
CDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)