diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 56fd3f1323e92..2080f4f7941c6 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -889,7 +889,7 @@ def generate_build_tree( # * Leave disabled if "no_kleidiai" argument was specified. # * Enable if the target is Android and args.android_abi contains arm64* # * Enable for a Windows cross compile build if compile target is an Arm one. - # * Finally enable if platform.machine contains "arm64". This should cover the following cases: + # * Finally enable if platform.machine contains "arm64" and not a WebAssembly build. This should cover the following cases: # * Linux on Arm # * MacOs (case must be ignored) # * TODO Delegate responsibility for Onnxruntime_USE_KLEIDIAI = ON to CMake logic @@ -897,7 +897,7 @@ def generate_build_tree( if ( (args.android and "arm64" in args.android_abi.lower()) or (is_windows() and (args.arm64 or args.arm64ec or args.arm) and platform.architecture()[0] != "AMD64") - or ("arm64" in platform.machine().lower()) + or ("arm64" in platform.machine().lower() and not args.build_wasm) ): cmake_args += ["-Donnxruntime_USE_KLEIDIAI=ON"]