[config] Add NDEBUG and HB_NDEBUG
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
0a01deb76f
commit
42ae468a8a
|
@ -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"
|
||||
|
|
10
src/hb.hh
10
src/hb.hh
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue