fix(cmake): detect Windows ARM64 so blake3 NEON is linked - #27
Merged
Conversation
There was a problem hiding this comment.
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_PROCESSORbefore matchingaarch64|arm64to catch MSVC’s uppercaseARM64. - Also consider
CMAKE_GENERATOR_PLATFORM(lowercased) to detect Visual Studio generator platform selections likeARM64. - Keep the existing macOS
CMAKE_OSX_ARCHITECTUREShandling 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.