summaryrefslogtreecommitdiff
path: root/rijndael.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-05 23:45:59 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-05 23:45:59 -0500
commitf57df06c5e6d19d3bc5d02ec0a77ccde705e7a49 (patch)
tree1c97de1f57e77607e3b6cd3cf174ce041ff2b5f0 /rijndael.cpp
parent5a36cd54bd2132eb2c10c0fbddf8dd3c9f5d0a53 (diff)
downloadcryptopp-git-f57df06c5e6d19d3bc5d02ec0a77ccde705e7a49.tar.gz
Disable global optimizations for Rijndael using MSC compiler (GH #649)
Diffstat (limited to 'rijndael.cpp')
-rw-r--r--rijndael.cpp8
1 files changed, 8 insertions, 0 deletions
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