From cc7b58eef0551f7a084c405a33ef740214e556ab Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 21 Mar 2024 19:34:50 +1000 Subject: [PATCH] 3rdparty/lzma: Fix ARM64 build with clang-cl --- 3rdparty/lzma/src/7zCrc.c | 2 +- 3rdparty/lzma/src/AesOpt.c | 4 ++-- 3rdparty/lzma/src/LzFind.c | 2 +- 3rdparty/lzma/src/Sha256Opt.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/3rdparty/lzma/src/7zCrc.c b/3rdparty/lzma/src/7zCrc.c index c995a8be40..ccfd01f9e5 100644 --- a/3rdparty/lzma/src/7zCrc.c +++ b/3rdparty/lzma/src/7zCrc.c @@ -75,7 +75,7 @@ UInt32 Z7_FASTCALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UI // #pragma message("ARM*") - #if defined(_MSC_VER) + #if defined(_MSC_VER) && !defined(__clang__) #if defined(MY_CPU_ARM64) #if (_MSC_VER >= 1910) #ifndef __clang__ diff --git a/3rdparty/lzma/src/AesOpt.c b/3rdparty/lzma/src/AesOpt.c index cfa6413f4b..e48a6d641f 100644 --- a/3rdparty/lzma/src/AesOpt.c +++ b/3rdparty/lzma/src/AesOpt.c @@ -576,7 +576,7 @@ VAES_COMPAT_STUB (AesCtr_Code_HW) #if defined(__clang__) || defined(__GNUC__) #ifdef MY_CPU_ARM64 - #define ATTRIB_AES __attribute__((__target__("+crypto"))) + #define ATTRIB_AES __attribute__((__target__("+crypto,aes"))) #else #define ATTRIB_AES __attribute__((__target__("fpu=crypto-neon-fp-armv8"))) #endif @@ -590,7 +590,7 @@ VAES_COMPAT_STUB (AesCtr_Code_HW) #define ATTRIB_AES #endif -#if defined(_MSC_VER) && defined(MY_CPU_ARM64) +#if defined(_MSC_VER) && !defined(__clang__) && defined(MY_CPU_ARM64) #include #else #include diff --git a/3rdparty/lzma/src/LzFind.c b/3rdparty/lzma/src/LzFind.c index 0fbd5aae56..799d6227ba 100644 --- a/3rdparty/lzma/src/LzFind.c +++ b/3rdparty/lzma/src/LzFind.c @@ -625,7 +625,7 @@ void MatchFinder_Init(CMatchFinder *p) #endif #endif - #if defined(_MSC_VER) && defined(MY_CPU_ARM64) + #if defined(_MSC_VER) && !defined(__clang__) && defined(MY_CPU_ARM64) #include #else #include diff --git a/3rdparty/lzma/src/Sha256Opt.c b/3rdparty/lzma/src/Sha256Opt.c index e4465e3e7d..afb351d278 100644 --- a/3rdparty/lzma/src/Sha256Opt.c +++ b/3rdparty/lzma/src/Sha256Opt.c @@ -224,7 +224,7 @@ void Z7_FASTCALL Sha256_UpdateBlocks_HW(UInt32 state[8], const Byte *data, size_ #if defined(__clang__) || defined(__GNUC__) #ifdef MY_CPU_ARM64 - #define ATTRIB_SHA __attribute__((__target__("+crypto"))) + #define ATTRIB_SHA __attribute__((__target__("+crypto,sha2"))) #else #define ATTRIB_SHA __attribute__((__target__("fpu=crypto-neon-fp-armv8"))) #endif @@ -234,7 +234,7 @@ void Z7_FASTCALL Sha256_UpdateBlocks_HW(UInt32 state[8], const Byte *data, size_ #define _ARM_USE_NEW_NEON_INTRINSICS #endif -#if defined(_MSC_VER) && defined(MY_CPU_ARM64) +#if defined(_MSC_VER) && !defined(__clang__) && defined(MY_CPU_ARM64) #include #else #include