From f57df06c5e6d19d3bc5d02ec0a77ccde705e7a49 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 5 Nov 2018 23:45:59 -0500 Subject: Disable global optimizations for Rijndael using MSC compiler (GH #649) --- rijndael.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rijndael.cpp') diff --git a/rijndael.cpp b/rijndael.cpp index 76d91e63..f00cc277 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -88,6 +88,14 @@ being unloaded from L1 cache, until that round is finished. #include "misc.h" #include "cpu.h" +// MSVC bug, still don't know how to fix it. TODO, figure out +// when we can re-enable optimizations for MSVC. Also see +// https://github.com/weidai11/cryptopp/issues/649 +#if defined(_MSC_VER) && (_MSC_VER >= 1910) +# pragma optimize("", off) +# pragma optimize("ts", on) +#endif + NAMESPACE_BEGIN(CryptoPP) // Hack for http://github.com/weidai11/cryptopp/issues/42 and http://github.com/weidai11/cryptopp/issues/132 -- cgit v1.2.1