Skip to content

Commit 52a89a8

Browse files
committed
[tools] Fix cppia bindir for arm64
1 parent 4cc1828 commit 52a89a8

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

tools/hxcpp/BuildTool.hx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,15 +1632,16 @@ class BuildTool
16321632

16331633
if (args.length>0 && args[0].endsWith(".cppia"))
16341634
{
1635-
var binDir = isWindows ? "Windows" : isMac ? "Mac64" : isLinux ? "Linux64" : null;
1636-
if (binDir==null)
1635+
var hostName = isWindows ? "Windows" : isMac ? "Mac" : isLinux ? "Linux" : null;
1636+
if (hostName==null)
16371637
Log.error("Cppia is not supported on this host.");
1638-
var arch = getArch();
1639-
var binDir = isWindows ? (isWindowsArm ? "WindowsArm64" : "Windows64" ) :
1640-
isMac ? "Mac64" :
1641-
isLinux ? ("Linux64") :
1642-
null;
1643-
var exe = '$HXCPP/bin/$binDir/Cppia' + (isWindows ? ".exe" : "");
1638+
var archSuffix = switch getArch() {
1639+
case 'arm64': 'Arm64';
1640+
case 'm64': '64';
1641+
case 'm32': '';
1642+
case _: return Log.error("Unsupported host architecture");
1643+
};
1644+
var exe = '$HXCPP/bin/$hostName$archSuffix/Cppia' + (isWindows ? ".exe" : "");
16441645
if (!isWindows)
16451646
{
16461647
var phase = "find";

0 commit comments

Comments
 (0)