From f19d1faedd5c70e6e5c5a16dfb7cd42f105db21e Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 24 Sep 2015 13:38:59 -0700 Subject: [PATCH] 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 --- mk/spdk.common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index f44ba29aa..26860c3dc 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -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