[config] Add NDEBUG and HB_NDEBUG

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
Behdad Esfahbod 2019-05-13 23:43:45 -07:00
parent 0a01deb76f
commit 42ae468a8a
2 changed files with 10 additions and 10 deletions

View File

@ -40,10 +40,14 @@
#define HB_LEAN
#define HB_MINI
#define HB_NO_MT
#ifndef NDEBUG
#define NDEBUG
#endif
#endif
#ifdef HB_LEAN
#define HB_DISABLE_DEPRECATED
#define HB_NDEBUG
#define HB_NO_ATEXIT
#define HB_NO_BUFFER_SERIALIZE
#define HB_NO_BITMAP
@ -103,6 +107,12 @@
#define HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
#endif
#ifdef NDEBUG
#ifndef HB_NDEBUG
#define HB_NDEBUG
#endif
#endif
#ifdef HAVE_CONFIG_OVERRIDE_H
#include "config-override.h"

View File

@ -468,16 +468,6 @@ typedef uint64_t hb_vector_size_impl_t;
#endif
/* HB_NDEBUG disables some sanity checks that are very safe to disable and
* should be disabled in production systems. If NDEBUG is defined, enable
* HB_NDEBUG; but if it's desirable that normal assert()s (which are very
* light-weight) to be enabled, then HB_DEBUG can be defined to disable
* the costlier checks. */
#ifdef NDEBUG
#define HB_NDEBUG 1
#endif
/* Flags */
/* Enable bitwise ops on enums marked as flags_t */