mdbx: NDEBUG.

Change-Id: I5c8edcad6fc7a0f3f7e4842f4a92fdb685e2e132
This commit is contained in:
Leo Yuriev 2016-02-09 09:20:59 +03:00
parent 0deb198ca2
commit 0a8e59c314
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ mandir ?= $(prefix)/man
CC ?= gcc CC ?= gcc
XCFLAGS ?= XCFLAGS ?=
CFLAGS ?= -O2 -ggdb3 -Wall -Werror -Wno-unused-parameter CFLAGS ?= -O2 -ggdb3 -Wall -Werror -Wno-unused-parameter -DNDEBUG=1
CFLAGS += -pthread $(XCFLAGS) CFLAGS += -pthread $(XCFLAGS)
######################################################################## ########################################################################

View File

@ -82,7 +82,7 @@
#endif /* __must_check_result */ #endif /* __must_check_result */
#ifndef __hot #ifndef __hot
# if defined(__GNUC__) && !defined(__clang__) # if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__))
# define __hot __attribute__((hot, optimize("O3"))) # define __hot __attribute__((hot, optimize("O3")))
# else # else
# define __hot # define __hot
@ -90,7 +90,7 @@
#endif /* __hot */ #endif /* __hot */
#ifndef __cold #ifndef __cold
# if defined(__GNUC__) && !defined(__clang__) # if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__))
# define __cold __attribute__((cold, optimize("Os"))) # define __cold __attribute__((cold, optimize("Os")))
# elif defined(__GNUC__) # elif defined(__GNUC__)
/* cland case, just put infrequently used functions in separate section */ /* cland case, just put infrequently used functions in separate section */
@ -101,7 +101,7 @@
#endif /* __cold */ #endif /* __cold */
#ifndef __flatten #ifndef __flatten
# if defined(__GNUC__) || defined(__clang__) # if defined(NDEBUG) && (defined(__GNUC__) || defined(__clang__))
# define __flatten __attribute__((flatten)) # define __flatten __attribute__((flatten))
# else # else
# define __flatten # define __flatten