[msvc] Add WinRT ARM64 support and fix toolchain pathing/compilation issues#1335
Open
FixFlare wants to merge 1 commit intoHaxeFoundation:masterfrom
Open
[msvc] Add WinRT ARM64 support and fix toolchain pathing/compilation issues#1335FixFlare wants to merge 1 commit intoHaxeFoundation:masterfrom
FixFlare wants to merge 1 commit intoHaxeFoundation:masterfrom
Conversation
7 tasks
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.
Summary
This PR adds support for building WinRT (UWP) applications for the ARM64 architecture using MSVC. It provides a new environment setup script and fixes directory-naming bugs in
hxcpp.Key Changes
1. New Setup Script:
msvc-winrt-arm64-setup.batAdded a dedicated setup script for WinRT ARM64. It specifically:
x64_arm64cross-compiler (host x64, target arm64).UWPapp platform viavcvarsall.bat.vswhere.2. BINDIR Routing for WinRT ARM64
Updated
BuildTool.hxto setBINDIRtoWinRTArm64when thewinrtandHXCPP_ARM64defines are both present. This ensures compatibility with engine-level expectations (like Lime) and prevents WinRT ARM64 binaries from being placed in the x64 (WinRT64) folder.3. Object Directory Naming
Fixed a bug in
msvc-toolchain.xmlwhere ARM64 builds would receive a redundantarmprefix (e.g.,armarm64). It also ensures the-rt(WinRT) suffix is preserved and not overwritten by the architecture flag.4. Core Runtime Hardening (Fixes ARM64 Compilation Errors)
hxString.h: Addedexplicitto WinRT-specific string constructors (Platform::String^). This fixes "ambiguous overload" errors that occur on the ARM64 MSVC compiler during implicit conversion.StdLibs.cpp: Optimized__traceto useHX_CSTRINGfor static string literals. This fixes compilation failures related to string operator ambiguity on ARM64 and prevents potential runtime crashes in the UWP sandbox.Verification