From 9a6c0b4ed5779fa7f8ca40d2ee08029dc569b2cc Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 23 Oct 2024 21:12:46 +0300 Subject: [PATCH 1/4] Update Lib.cpp --- src/hx/Lib.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hx/Lib.cpp b/src/hx/Lib.cpp index e15ad6097..3ed4ecc4c 100644 --- a/src/hx/Lib.cpp +++ b/src/hx/Lib.cpp @@ -393,7 +393,11 @@ String __hxcpp_get_bin_dir() #elif defined(APPLETVOS) HX_CSTRING("AppleTVOS"); #else - #ifdef HXCPP_M64 + #ifdef HXCPP_ARM64 + HX_CSTRING("LinuxArm64"); + #elif defined(HXCPP_ARMV7) + HX_CSTRING("LinuxArm"); + #elif defined(HXCPP_M64) HX_CSTRING("Linux64"); #else HX_CSTRING("Linux"); From c782a3525378d7a6a313f6ce35afab510814b34a Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 23 Oct 2024 21:18:53 +0300 Subject: [PATCH 2/4] Update BuildTool.hx --- tools/hxcpp/BuildTool.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx index d6b42f513..34696b8c9 100644 --- a/tools/hxcpp/BuildTool.hx +++ b/tools/hxcpp/BuildTool.hx @@ -2074,7 +2074,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) ) From e6ecb6c3f659f708d65027009ce6f1803f518c3c Mon Sep 17 00:00:00 2001 From: Lily Date: Fri, 25 Oct 2024 16:44:14 +0300 Subject: [PATCH 3/4] Update BuildTool.hx --- tools/hxcpp/BuildTool.hx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx index 34696b8c9..841dbe2d4 100644 --- a/tools/hxcpp/BuildTool.hx +++ b/tools/hxcpp/BuildTool.hx @@ -66,6 +66,7 @@ class BuildTool var mNvccLinkFlags:Array; var mDirtyList:Array; var arm64:Bool; + var armv7:Bool; var m64:Bool; var m32:Bool; @@ -134,8 +135,9 @@ class BuildTool m64 = mDefines.exists("HXCPP_M64"); m32 = mDefines.exists("HXCPP_M32"); arm64 = mDefines.exists("HXCPP_ARM64"); - var otherArmArchitecture = mDefines.exists("HXCPP_ARMV6") || mDefines.exists("HXCPP_ARMV7") || mDefines.exists("HXCPP_ARMV7S"); - if (m64==m32 && !arm64 && !otherArmArchitecture) + armv7 = mDefines.exists("HXCPP_ARMV7"); + var otherArmArchitecture = mDefines.exists("HXCPP_ARMV6") || mDefines.exists("HXCPP_ARMV7S"); + if (m64==m32 && !arm64 && !armv7 && !otherArmArchitecture) { var arch = mDefines.get("HXCPP_ARCH"); if (arch!=null) @@ -143,6 +145,7 @@ class BuildTool m64 = arch=="x86_64"; m32 = arch=="x86"; arm64 = arch=="arm64"; + armv7 = arch=="armv7"; } else { @@ -152,6 +155,7 @@ class BuildTool m64 = hostArch=="m64"; m32 = hostArch=="m32"; arm64 = hostArch=="arm64"; + armv7 = hostArch=="armv7"; } mDefines.remove(m32 ? "HXCPP_M64" : "HXCPP_M32"); @@ -2060,21 +2064,21 @@ class BuildTool defines.set("toolchain","linux"); defines.set("linux","linux"); - if (defines.exists("HXCPP_LINUX_ARMV7")) + if (armv7) { defines.set("noM32","1"); defines.set("noM64","1"); defines.set("HXCPP_ARMV7","1"); m64 = false; } - else if (arm64 || defines.exists("HXCPP_LINUX_ARM64")) + else if (arm64) { defines.set("noM32","1"); defines.set("noM64","1"); defines.set("HXCPP_ARM64","1"); m64 = true; } - defines.set("BINDIR", arm64 ? "LinuxArm64" : m64 ? "Linux64" : "Linux"); + defines.set("BINDIR", arm64 ? "LinuxArm64" : armv7 ? "LinuxArm" : m64 ? "Linux64" : "Linux"); } } else if ( (new EReg("mac","i")).match(os) ) From 793e634c99df73f6d2aac0d8fdd4c7623d0bb56d Mon Sep 17 00:00:00 2001 From: Lily Date: Fri, 25 Oct 2024 16:46:04 +0300 Subject: [PATCH 4/4] Update Defines.md --- docs/build_xml/Defines.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/build_xml/Defines.md b/docs/build_xml/Defines.md index cddbbeff5..5233c4b1b 100755 --- a/docs/build_xml/Defines.md +++ b/docs/build_xml/Defines.md @@ -63,8 +63,6 @@ Defines affecting target architecture. | *HXCPP_ARM64* | Compile arm-based devices for 64 bits | | *HXCPP_ARMV7* | Compile arm-based devices for armv7 | | *HXCPP_ARMV7S* | Compile arm-based devices for armv7s | -| *HXCPP_LINUX_ARMV7* | Run on a linux ARMv7 device | -| *HXCPP_LINUX_ARM64* | Run on a linux ARM64 device | | *winrt* | Compile for windowsRt/windows UWP | | *android* | Compile for android | | *PLATFORM* | Specify the android platform for NDK compilation |