Fix compiling for Windows/ARM(64), linking still not working.

This commit is contained in:
2021-10-24 06:22:19 +01:00
parent a5b3b7a34e
commit 1340e84696
10 changed files with 45 additions and 16 deletions

View File

@@ -509,7 +509,7 @@ VAES_COMPAT_STUB (AesCtr_Code_HW)
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
#if defined(__clang__)
#if (__clang_major__ >= 8) && !defined(__ANDROID__) // fix that version check, Android with clang12 doesn't work
#if (__clang_major__ >= 8) && !defined(__ANDROID__) && !defined(__MINGW32__) // fix that version check, Android with clang12 doesn't work, neither does MingW
#define USE_HW_AES
#endif
#elif defined(__GNUC__)

View File

@@ -6,7 +6,7 @@
#include <stdio.h>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#endif
#include <stdlib.h>

View File

@@ -217,7 +217,7 @@ BoolInt CPU_Is_InOrder()
}
#if !defined(MY_CPU_AMD64) && defined(_WIN32)
#include <Windows.h>
#include <windows.h>
static BoolInt CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
@@ -275,7 +275,7 @@ BoolInt CPU_IsSupported_SHA()
// #include <stdio.h>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#endif
BoolInt CPU_IsSupported_AVX2()
@@ -351,7 +351,7 @@ BoolInt CPU_IsSupported_PageGB()
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
BoolInt CPU_IsSupported_CRC32() { return IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }
BoolInt CPU_IsSupported_CRYPTO() { return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }

View File

@@ -5,7 +5,7 @@
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#include "DllSecur.h"

View File

@@ -215,7 +215,7 @@ void MY_FAST_CALL Sha256_UpdateBlocks_HW(UInt32 state[8], const Byte *data, size
#elif defined(MY_CPU_ARM_OR_ARM64)
#if defined(__clang__)
#if (__clang_major__ >= 8) && !defined(__ANDROID__) // fix that version check, Android with clang12 doesn't work
#if (__clang_major__ >= 8) && !defined(__ANDROID__) && !defined(__MINGW32__) // fix that version check, Android with clang12 doesn't work, neither does MingW
#define USE_HW_SHA
#endif
#elif defined(__GNUC__)

View File

@@ -5,7 +5,7 @@
#define __7Z_THREADS_H
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#else
#if defined(__linux__)

View File

@@ -5,7 +5,7 @@
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#ifdef UNDER_CE
#undef VARIANT_TRUE

4
3rdparty/lzma.cmake vendored
View File

@@ -5,7 +5,9 @@ set("LZMA_ASM_DIRECTORY" "lzma-21.03beta/Asm")
add_library(lzma STATIC)
set_property(TARGET lzma PROPERTY POSITION_INDEPENDENT_CODE ON)
if(NOT "${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW" OR (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" AND NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
set_property(TARGET lzma PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
target_compile_definitions(lzma PUBLIC _REENTRANT)
target_compile_definitions(lzma PUBLIC _FILE_OFFSET_BITS)