build: disable assert() when building for release

Set -DNDEBUG to make assert() a no-op.  Since nvme_assert() is just an
alias for assert(), this controls compilation of nvme_assert as well.

Change-Id: Ie9d0c7fea007eff030179c1b54865adc3dcaf6b6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-09-24 13:38:59 -07:00
parent 736ec4967e
commit f19d1faedd

View File

@ -53,7 +53,7 @@ endif
ifeq ($(CONFIG_DEBUG), y)
COMMON_CFLAGS += -DDEBUG -O0
else
COMMON_CFLAGS += -O2
COMMON_CFLAGS += -DNDEBUG -O2
endif
CFLAGS += $(COMMON_CFLAGS) -Wno-pointer-sign -std=gnu11