From 19f0e3aa1e6370a272d6b063f17ab4e3220ec052 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 6 Oct 2023 00:46:30 -0400 Subject: [PATCH] Try fix build on MSYS2 using Clang in CLANG64 environment (GH #1241) More Clang troubles... --- config_cpu.h | 2 +- config_ver.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config_cpu.h b/config_cpu.h index e7e51e63..129f5e58 100644 --- a/config_cpu.h +++ b/config_cpu.h @@ -203,7 +203,7 @@ /// _MSC_VER nor __BORLANDC__ are defined. #define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY ... #elif defined(CRYPTOPP_MSC_VERSION) || defined(__BORLANDC__) || \ - (defined(CRYPTOPP_WIN32_AVAILABLE) && defined(CRYPTOPP_LLVM_CLANG_VERSION)) + defined(CRYPTOPP_MSVC_CLANG_VERSION) #define CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY 1 #else #define CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY 1 diff --git a/config_ver.h b/config_ver.h index 87658441..50e99370 100644 --- a/config_ver.h +++ b/config_ver.h @@ -58,6 +58,8 @@ // LLVM Clang version 3.7. Also see https://gist.github.com/yamaya/2924292 #if defined(__clang__) && defined(__apple_build_version__) # define CRYPTOPP_APPLE_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) +#elif defined(__clang__) && defined(_MSC_VER) +# define CRYPTOPP_MSVC_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #elif defined(__clang__) # define CRYPTOPP_LLVM_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #endif