Skip to content

Enable MSVC support for AArch64 code paths and Windows build fixes - #1305

Open
Harishmcw wants to merge 2 commits into
ARM-software:mainfrom
Harishmcw:win_arm64
Open

Enable MSVC support for AArch64 code paths and Windows build fixes#1305
Harishmcw wants to merge 2 commits into
ARM-software:mainfrom
Harishmcw:win_arm64

Conversation

@Harishmcw

@Harishmcw Harishmcw commented Jul 29, 2026

Copy link
Copy Markdown

Summary

This PR improves MSVC compatibility for Windows on Arm64 by extending AArch64-specific code paths to also recognize _M_ARM64, and fixes the SCons build system to work correctly on native ARM64 Windows hosts.

Motivation

  • While building OpenVINO for Windows on Arm64 using MSVC, several compilation failures and runtime crashes were encountered in ARM Compute Library due to ARM64-specific code being guarded only by aarch64.
  • MSVC defines _M_ARM64 instead of aarch64, causing those code paths to be excluded.
    This resulted in compilation errors such as:
error C2039: 'NEReorderLayer': is not a member of 'arm_compute'
error C3646: unknown override specifier
error C4430: missing type specifier
  • Additionally, the SCons build fails on native ARM64 Windows hosts because the assembler command template defaults to POSIX-style flags (-o) instead of MSVC-style (/Fo) that clang-cl expects.

Fix

This PR updates ARM64-specific code paths to support both GCC/Clang and MSVC by replacing architecture guards of the form:

#ifdef __aarch64__

with

#if defined(__aarch64__) || defined(_M_ARM64)

The changes include:

  • ActivationLayerInfo.h — Enables ARM64-specific members and introduces an MSVC-compatible float16_t alias.
  • LUTManager.h — Enables ARM64 lookup table definitions for MSVC.
  • QuantizationInfo.h — Applies the ARM64 rounding policy for MSVC builds.
  • NEReorderLayer.h — Makes NEReorderLayer available for _M_ARM64.

SConstruct

  • Explicitly sets ASCOM and ASPPCOM for the Windows build. The os == 'windows' block already overrides AS to clang-cl, but doesn't set the command template.
  • On native ARM64 Windows hosts, SCons fails to auto-detect MSVC and falls back to POSIX-style flags (-o), which clang-cl rejects. This fix completes the existing Windows overrides.

@Harishmcw Harishmcw changed the title Enable MSVC support for AArch64 code paths Enable MSVC support for AArch64 code paths and Windows build fixes Aug 5, 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.

1 participant