Avoid use of NDEBUG in source files
Posix NDEBUG causes our test script to fail the Posix Assert testpull/757/head
parent
774454ba7c
commit
318d53f6f9
|
|
@ -42,10 +42,12 @@ extern const char CHACHA_AVX_FNAME[] = __FILE__;
|
||||||
// https://github.com/weidai11/cryptopp/issues/735. The
|
// https://github.com/weidai11/cryptopp/issues/735. The
|
||||||
// 649 issue affects AES but it is the same here. The 735
|
// 649 issue affects AES but it is the same here. The 735
|
||||||
// issue is ChaCha AVX2 cut-in where it surfaced again.
|
// issue is ChaCha AVX2 cut-in where it surfaced again.
|
||||||
#if (_MSC_VER >= 1910) && defined(NDEBUG)
|
#if (_MSC_VER >= 1910)
|
||||||
|
# ifndef CRYPTOPP_DEBUG
|
||||||
# pragma optimize("", off)
|
# pragma optimize("", off)
|
||||||
# pragma optimize("ts", on)
|
# pragma optimize("ts", on)
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
ANONYMOUS_NAMESPACE_BEGIN
|
ANONYMOUS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,12 @@ being unloaded from L1 cache, until that round is finished.
|
||||||
// VS2017 and global optimization bug. TODO, figure out when
|
// VS2017 and global optimization bug. TODO, figure out when
|
||||||
// we can re-enable full optimizations for VS2017. Also see
|
// we can re-enable full optimizations for VS2017. Also see
|
||||||
// https://github.com/weidai11/cryptopp/issues/649
|
// https://github.com/weidai11/cryptopp/issues/649
|
||||||
#if (_MSC_VER >= 1910) && defined(NDEBUG)
|
#if (_MSC_VER >= 1910)
|
||||||
|
# ifndef CRYPTOPP_DEBUG
|
||||||
# pragma optimize("", off)
|
# pragma optimize("", off)
|
||||||
# pragma optimize("ts", on)
|
# pragma optimize("ts", on)
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue