mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-24 17:01:07 +00:00
Revert "[Support/BLAKE3] Re-enable building with the simd-optimized implementations"
This reverts commit 23519d3000
.
This breaks the build with clang-5:
/usr/bin/clang-5.0 -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support/BLAKE3 -Illvm/lib/Support/BLAKE3 -Iinclude -Illvm/include -fPIC -O3 -DNDEBUG -MD -MT lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o -MF lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o.d -o lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o -c llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S
...
llvm/lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S:54:9: error: instruction requires: AVX-512 ISA
kmovw k1, r9d
^
This commit is contained in:
parent
b39f437757
commit
267d1873fa
@ -4,21 +4,6 @@ set(LLVM_BLAKE3_FILES
|
||||
blake3_portable.c
|
||||
)
|
||||
|
||||
set(CAN_USE_ASSEMBLER TRUE)
|
||||
# Some LLVM builders set "CC=ccache /path/to/clang" as environment variable,
|
||||
# which confuses CMake thinking the assembler to use is the 'ccache' binary.
|
||||
# These builders need to also set "ASM=/path/to/clang" in environment, but until
|
||||
# this happens check for this case and disable building the assembly files.
|
||||
get_filename_component(ASM_BINARY ${CMAKE_ASM_COMPILER} NAME)
|
||||
if (ASM_BINARY STREQUAL "ccache")
|
||||
message(WARNING "CMake is set to use '${CMAKE_ASM_COMPILER}' as assembler "
|
||||
"which is likely due to having 'CC=ccache /path/to/clang' in the environment. "
|
||||
"Building the BLAKE3 SIMD-optimized assembly files is disabled, set "
|
||||
"'ASM=/path/to/clang' as environment variable and do a clean re-configure "
|
||||
"to correct this.")
|
||||
set(CAN_USE_ASSEMBLER FALSE)
|
||||
endif()
|
||||
|
||||
# The BLAKE3 team recommends using the assembly versions, from the README:
|
||||
#
|
||||
# "For each of the x86 SIMD instruction sets, four versions are available:
|
||||
@ -26,18 +11,13 @@ endif()
|
||||
# version using C intrinsics. The assembly versions are generally
|
||||
# preferred. They perform better, they perform more consistently across
|
||||
# different compilers, and they build more quickly."
|
||||
|
||||
# FIXME: Figure out what is wrong with the builders when using the assembly files and neon.
|
||||
if (MSVC)
|
||||
check_symbol_exists(_M_X64 "" IS_X64)
|
||||
check_symbol_exists(_M_ARM64 "" IS_ARM64)
|
||||
else()
|
||||
check_symbol_exists(__x86_64__ "" IS_X64)
|
||||
check_symbol_exists(__aarch64__ "" IS_ARM64)
|
||||
enable_language(ASM_MASM)
|
||||
endif()
|
||||
|
||||
if (IS_X64 AND CAN_USE_ASSEMBLER)
|
||||
if (FALSE)#CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||
if (MSVC)
|
||||
enable_language(ASM_MASM)
|
||||
list(APPEND LLVM_BLAKE3_FILES
|
||||
blake3_sse2_x86-64_windows_msvc.asm
|
||||
blake3_sse41_x86-64_windows_msvc.asm
|
||||
@ -61,15 +41,14 @@ if (IS_X64 AND CAN_USE_ASSEMBLER)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (IS_ARM64)
|
||||
if (FALSE)#CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch)")
|
||||
list(APPEND LLVM_BLAKE3_FILES
|
||||
blake3_neon.c
|
||||
)
|
||||
endif()
|
||||
|
||||
if (IS_X64 AND NOT CAN_USE_ASSEMBLER)
|
||||
add_definitions(-DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_SSE2)
|
||||
endif()
|
||||
# FIXME: Figure out what is wrong with the builders when using the assembly files.
|
||||
add_definitions(-DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_SSE2 -DBLAKE3_USE_NEON=0)
|
||||
|
||||
add_library(LLVMSupportBlake3 OBJECT EXCLUDE_FROM_ALL ${LLVM_BLAKE3_FILES})
|
||||
llvm_update_compile_flags(LLVMSupportBlake3)
|
||||
|
Loading…
Reference in New Issue
Block a user