From 9d6b27e2adca17e51f09571f77330116da507e7a Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Sat, 28 Mar 2026 12:25:15 +0900 Subject: [PATCH] [Build] Fix MSVC compilation on ARM64 --- third_party/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 094a7fbb1..fcdca8bbf 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -310,9 +310,10 @@ if(XE_TARGET_AARCH64) ARM_ACLE HAVE_ARM_ACLE_H WITH_GZFILEOP - HAVE_BUILTIN_CTZ - HAVE_BUILTIN_CTZLL ) + if(NOT MSVC) + target_compile_definitions(zlib-ng PRIVATE HAVE_BUILTIN_CTZ HAVE_BUILTIN_CTZLL) + endif() else() file(GLOB _zlibng_x86 "zlib-ng/arch/x86/*.c") add_library(zlib-ng STATIC