From 0bd565eadea87a23c697c5562d3ffae6018cc543 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:24:45 +0900 Subject: [PATCH] [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. --- third_party/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index ab5bf3f43..1a035c7dd 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -241,7 +241,10 @@ target_compile_definitions(zstd PRIVATE XXH_NAMESPACE=ZSTD_ 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) endif()