Skip to content

Fix Windows ARM64 build failure from x86-only memory fence - #82

Closed
yumisims with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-build-failure
Closed

yumisims with Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-build-failure

Conversation

Copilot AI commented Sep 18, 2026 •

Copy link
Copy Markdown

The build (windows-11-arm, arm64, windows-arm64, windows) job failed because the Windows build path used an x86-only fence intrinsic in shared code. On ARM64 runners, MSVC could not resolve _mm_mfence, stopping compilation of PretextView.cpp.

  • Root cause

    • ThreadFence in include/Header.h mapped to _mm_mfence() for all Windows targets.
    • That intrinsic is not available on Windows ARM64, even though the same header is used by the ARM64 build.
  • Change

    • Replaced the Windows ThreadFence definition with MemoryBarrier().
    • This preserves the intended full memory barrier semantics while removing the x86-specific dependency from the Windows code path.
  • Impact

    • Unblocks compilation on Windows ARM64 runners.
    • Keeps existing non-Windows behavior unchanged.
  • Relevant snippet

    #ifndef _WIN32
    #define ThreadFence __asm__ volatile("" ::: "memory")
    #else
    #define ThreadFence MemoryBarrier()
    #endif // _WIN32

Co-authored-by: yumisims <13556579+yumisims@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job build on Windows Fix Windows ARM64 build failure from x86-only memory fence Sep 18, 2026
Copilot AI requested a review from yumisims September 18, 2026 20:45
@yumisims
yumisims marked this pull request as ready for review September 18, 2026 20:49
@yumisims yumisims closed this Sep 23, 2026
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