Skip to content

Handle MSVC ARM64 cross compilation build#10

Merged
zhaozg merged 3 commits intozhaozg:masterfrom
cosmo0920:handle-msvc-arm64-build
Jun 7, 2025
Merged

Handle MSVC ARM64 cross compilation build#10
zhaozg merged 3 commits intozhaozg:masterfrom
cosmo0920:handle-msvc-arm64-build

Conversation

@cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Jul 5, 2024

Currently, MSVC does not have ARM64 native compilers. So, we need to confirm ARM64 Windows(_M_ARM64) target. The current building sequence of ARM64 Windows is:

  • Specify Host=x64 Target=arm64 for Visual Studio
  • Launch x64 compiler on Prism emulator
  • CMake should handle as cross compiling but it'll be handled within MSVC mechanism

Thus, we need to handle this condition with the ARM64_MSVC flag.

Currently, MSVC does not have ARM64 native compilers.
So, we need to confirm ARM64 Windows(_M_ARM64) target.
The current building sequence of ARM64 Windows is:

* Specify Host=x64 Target=arm64 for Visual Studio
* Launch x64 compiler on Prism emulator
* CMake should handle as cross compiling but it'll be handled within
  MSVC mechanism

Thus, we need to handle this condition with the CROSSCOMPILING_MSVC
flag.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 marked this pull request as draft July 5, 2024 08:51
@cosmo0920 cosmo0920 force-pushed the handle-msvc-arm64-build branch 3 times, most recently from 704ca6b to e0def59 Compare July 5, 2024 10:13
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 force-pushed the handle-msvc-arm64-build branch from e0def59 to 6c6dff1 Compare July 5, 2024 11:03
Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
Copy link
Owner

@zhaozg zhaozg left a comment

Choose a reason for hiding this comment

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

Ok, I leave some comment, would you think about that?

@cosmo0920 cosmo0920 force-pushed the handle-msvc-arm64-build branch from 4a9e47d to ce51e18 Compare June 2, 2025 09:18
@zhaozg zhaozg merged commit 5a09e3c into zhaozg:master Jun 7, 2025
@cosmo0920 cosmo0920 deleted the handle-msvc-arm64-build branch June 8, 2025 15:29
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