Windows/ARM64 - fix build with clang-cl

This commit is contained in:
Vladislav Vaintroub 2025-05-23 14:47:00 +02:00
parent be48b3ee59
commit d665810cf0
2 changed files with 8 additions and 2 deletions

View File

@ -174,10 +174,9 @@ if(MSVC)
-Wno-unused-local-typedef
-Wno-microsoft-static-assert
-Wno-c++17-extensions
-msse4.2
)
if((CMAKE_SIZEOF_VOID_P MATCHES 8) AND MSVC_INTEL)
add_compile_options(-mpclmul)
add_compile_options(-mpclmul -msse4.2)
endif()
endif()

View File

@ -69,6 +69,13 @@ IF(MSVC_INTEL)
ELSEIF(MSVC_ARM64)
SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_arm64.c)
ADD_DEFINITIONS(-DHAVE_ARMV8_CRC -DHAVE_ARMV8_CRC_CRYPTO_INTRINSICS)
IF(CLANG_CL)
SET_SOURCE_FILES_PROPERTIES(
crc32/crc32_arm64.c
PROPERTIES
COMPILE_FLAGS "-march=armv8-a+crc"
)
ENDIF()
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686")
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c crc32/crc32c_x86.cc)
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5")