diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-02-13 06:36:35 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-02-13 06:36:35 -0500 |
commit | b28d2d4a7efd63ebc8a2026bf369fb8de940f45c (patch) | |
tree | d9c0ff41efed7c3f7ff9d50bf8e06690063523a4 /config_misc.h | |
parent | 6b4887b6f46d0a7278e55848f2823454324dc1d2 (diff) | |
download | cryptopp-git-b28d2d4a7efd63ebc8a2026bf369fb8de940f45c.tar.gz |
Pickup Android NDK_DEBUG=1 for Debug builds
Diffstat (limited to 'config_misc.h')
-rw-r--r-- | config_misc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/config_misc.h b/config_misc.h index e59065a2..67b2d4ab 100644 --- a/config_misc.h +++ b/config_misc.h @@ -72,9 +72,12 @@ // raises a SIGTRAP (Unix) or calls DebugBreak() (Windows). CRYPTOPP_ASSERT
// is only in effect when CRYPTOPP_DEBUG, DEBUG or _DEBUG is defined. Unlike
// Posix assert, CRYPTOPP_ASSERT is not affected by NDEBUG (or failure to
-// define it).
-// Also see http://github.com/weidai11/cryptopp/issues/277, CVE-2016-7420
-#if (defined(DEBUG) || defined(_DEBUG)) && !defined(CRYPTOPP_DEBUG)
+// define it). According to the ndk-build docs, Android use NDK_DEBUG=1 to
+// signal a DEBUG build (and NDK_DEBUG=0 to signal non-DEBUG build).
+// Also see http://github.com/weidai11/cryptopp/issues/277, CVE-2016-7420 and
+// https://developer.android.com/ndk/guides/ndk-build
+#if (defined(DEBUG) || defined(_DEBUG)) || (defined(NDK_DEBUG) && (NDK_DEBUG > 0))
+# undef CRYPTOPP_DEBUG
# define CRYPTOPP_DEBUG 1
#endif
|