Skip to content

Commit f215b88

Browse files
committed
[Support/BLAKE3] Disable BLAKE3 assembly temporarily
rdar://91050484
1 parent 1b27527 commit f215b88

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

llvm/lib/Support/BLAKE3/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set(LLVM_BLAKE3_FILES
44
blake3_portable.c
55
)
66

7+
# Temporary disable assembly until rdar://91050484 is investigated.
8+
set(CAN_USE_ASSEMBLER FALSE)
9+
710
# The BLAKE3 team recommends using the assembly versions, from the README:
811
#
912
# "For each of the x86 SIMD instruction sets, four versions are available:
@@ -20,7 +23,7 @@ else()
2023
check_symbol_exists(__aarch64__ "" IS_ARM64)
2124
endif()
2225

23-
if (IS_X64)
26+
if (IS_X64 AND CAN_USE_ASSEMBLER)
2427
if (MSVC)
2528
enable_language(ASM_MASM)
2629
list(APPEND LLVM_BLAKE3_FILES
@@ -52,5 +55,9 @@ if (IS_ARM64)
5255
)
5356
endif()
5457

58+
if (IS_X64 AND NOT CAN_USE_ASSEMBLER)
59+
add_definitions(-DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_SSE2)
60+
endif()
61+
5562
add_library(LLVMSupportBlake3 OBJECT EXCLUDE_FROM_ALL ${LLVM_BLAKE3_FILES})
5663
llvm_update_compile_flags(LLVMSupportBlake3)

0 commit comments

Comments
 (0)