Skip to content

fix(cmake): detect Windows ARM64 so blake3 NEON is linked - #27

Merged
gabewillen merged 1 commit into
mainfrom
fix/win32-arm64-blake3-neon
Aug 18, 2026
Merged

fix(cmake): detect Windows ARM64 so blake3 NEON is linked#27
gabewillen merged 1 commit into
mainfrom
fix/win32-arm64-blake3-neon

Conversation

@gabewillen

Copy link
Copy Markdown
Contributor

Round 6 of the Windows port for the npm release of @augmem/cortext v1.3.3
(follow-up to PRs #22-#26). win32-x64 now builds and uploads. win32-arm64
fails at link with:

unresolved external symbol blake3_hash_many_neon

blake3_dispatch.c calls the NEON implementation on AArch64, and
blake3_neon.c is only added when CORTEXT_TARGET_AARCH64 is ON. That flag
was set by matching CMAKE_SYSTEM_PROCESSOR against aarch64|arm64, which
misses MSVC's uppercase ARM64 (and CMAKE_GENERATOR_PLATFORM). This
lowercases both values before matching so Windows ARM64 links blake3_neon.c.

Copilot AI lite review requested due to automatic review settings August 18, 2026 02:56
@gabewillen
gabewillen merged commit 834ce3b into main Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates early CMake target-architecture detection so Windows ARM64 builds correctly enable the AArch64 path, ensuring the embedded sqlite-objstore BLAKE3 NEON implementation (blake3_neon.c) is compiled and linked when the build system reports ARM64 in MSVC/Visual Studio conventions.

Changes:

  • Lowercase CMAKE_SYSTEM_PROCESSOR before matching aarch64|arm64 to catch MSVC’s uppercase ARM64.
  • Also consider CMAKE_GENERATOR_PLATFORM (lowercased) to detect Visual Studio generator platform selections like ARM64.
  • Keep the existing macOS CMAKE_OSX_ARCHITECTURES handling as the primary signal for Apple builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants