From 6dc606f33825ab4642d3d38fa4173c3ab4d6765a Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Sun, 15 Mar 2026 15:18:50 +0000 Subject: [PATCH 1/2] [tools] Fix cppia bindir for arm64 --- tools/hxcpp/BuildTool.hx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx index 49ee8b9d1..73d20daf9 100644 --- a/tools/hxcpp/BuildTool.hx +++ b/tools/hxcpp/BuildTool.hx @@ -1632,15 +1632,16 @@ class BuildTool if (args.length>0 && args[0].endsWith(".cppia")) { - var binDir = isWindows ? "Windows" : isMac ? "Mac64" : isLinux ? "Linux64" : null; - if (binDir==null) + var hostName = isWindows ? "Windows" : isMac ? "Mac" : isLinux ? "Linux" : null; + if (hostName==null) Log.error("Cppia is not supported on this host."); - var arch = getArch(); - var binDir = isWindows ? (isWindowsArm ? "WindowsArm64" : "Windows64" ) : - isMac ? "Mac64" : - isLinux ? ("Linux64") : - null; - var exe = '$HXCPP/bin/$binDir/Cppia' + (isWindows ? ".exe" : ""); + var archSuffix = switch getArch() { + case 'arm64': 'Arm64'; + case 'm64': '64'; + case 'm32': ''; + case _: return Log.error("Unsupported host architecture"); + }; + var exe = '$HXCPP/bin/$hostName$archSuffix/Cppia' + (isWindows ? ".exe" : ""); if (!isWindows) { var phase = "find"; From bba19f02f9e86b7fe2e94d6ae4db6c8a9a868f32 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Sun, 15 Mar 2026 15:25:02 +0000 Subject: [PATCH 2/2] [tools] Fix BINDIR for arm64 linux --- tools/hxcpp/BuildTool.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx index 73d20daf9..84775aaf8 100644 --- a/tools/hxcpp/BuildTool.hx +++ b/tools/hxcpp/BuildTool.hx @@ -2141,7 +2141,7 @@ class BuildTool defines.set("HXCPP_ARM64","1"); m64 = true; } - defines.set("BINDIR", m64 ? "Linux64":"Linux"); + defines.set("BINDIR", arm64 ? "LinuxArm64" : m64 ? "Linux64":"Linux"); } } else if ( (new EReg("mac","i")).match(os) ) @@ -2154,7 +2154,7 @@ class BuildTool defines.set("linux","linux"); defines.set("toolchain","linux"); defines.set("xcompile","1"); - defines.set("BINDIR", m64 ? "Linux64":"Linux"); + defines.set("BINDIR", arm64 ? "LinuxArm64" : m64 ? "Linux64":"Linux"); } else {