From 858c3a5362f3de9b920d0b3ad4b68710d435a976 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 26 Nov 2013 13:34:40 -0800 Subject: [PATCH] Force NDEBUG in sqlite, RocksDB, and HyperLevelDB by default --- src/BeastConfig.h | 7 +++++++ src/ripple/rocksdb/ripple_rocksdb.cpp | 5 +++++ src/ripple_hyperleveldb/ripple_hyperleveldb.cpp | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/src/BeastConfig.h b/src/BeastConfig.h index 7c6fd19203..2e0dc00cd0 100644 --- a/src/BeastConfig.h +++ b/src/BeastConfig.h @@ -107,6 +107,13 @@ #define BEAST_ZLIB_INCLUDE_PATH #endif +/** Config: BEAST_SQLITE_FORCE_NDEBUG + Setting this option forces sqlite into release mode even if NDEBUG is not set +*/ +#ifndef BEAST_SQLITE_FORCE_NDEBUG +#define BEAST_SQLITE_FORCE_NDEBUG 1 +#endif + //------------------------------------------------------------------------------ // // Boost diff --git a/src/ripple/rocksdb/ripple_rocksdb.cpp b/src/ripple/rocksdb/ripple_rocksdb.cpp index 38e6f061e7..2a73575185 100644 --- a/src/ripple/rocksdb/ripple_rocksdb.cpp +++ b/src/ripple/rocksdb/ripple_rocksdb.cpp @@ -43,6 +43,11 @@ # pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif +// Compile RocksDB without debugging unless specifically requested +#if !defined (NDEBUG) && !defined (RIPPLE_DEBUG_ROCKSDB) +#define NDEBUG +#endif + #include "rocksdb/db/builder.cc" #include "rocksdb/db/db_filesnapshot.cc" #include "rocksdb/db/dbformat.cc" diff --git a/src/ripple_hyperleveldb/ripple_hyperleveldb.cpp b/src/ripple_hyperleveldb/ripple_hyperleveldb.cpp index fc746f102a..c6317e4cb3 100644 --- a/src/ripple_hyperleveldb/ripple_hyperleveldb.cpp +++ b/src/ripple_hyperleveldb/ripple_hyperleveldb.cpp @@ -51,6 +51,11 @@ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif +// Compile HyperLevelDB without debugging unless specifically requested +#if !defined (NDEBUG) && !defined (RIPPLE_DEBUG_HYPERLEVELDB) +#define NDEBUG +#endif + #include "hyperleveldb/db/builder.cc" #include "hyperleveldb/db/db_impl.cc" #include "hyperleveldb/db/db_iter.cc"