[Build] Enable zstd ASM Huffman decoder on non-MSVC x86_64

zstd ships a hand-written huf_decompress_amd64.S that was being
disabled on all non-MSVC builds. New behavior matches zstd's own
CMakeLists which enables it on GCC/Clang x86_64 and disables it
on MSVC and non-x86 architectures.
This commit is contained in:
Herman S.
2026-03-26 14:24:45 +09:00
parent 86c7a8be79
commit 0bd565eade

View File

@@ -241,7 +241,10 @@ target_compile_definitions(zstd PRIVATE
XXH_NAMESPACE=ZSTD_ XXH_NAMESPACE=ZSTD_
ZSTD_LEGACY_SUPPORT=0 ZSTD_LEGACY_SUPPORT=0
) )
if(NOT MSVC) if(XE_TARGET_X86_64 AND NOT MSVC)
enable_language(ASM)
target_sources(zstd PRIVATE zstd/lib/decompress/huf_decompress_amd64.S)
else()
target_compile_definitions(zstd PRIVATE ZSTD_DISABLE_ASM) target_compile_definitions(zstd PRIVATE ZSTD_DISABLE_ASM)
endif() endif()