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 |
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");
diff --git a/toolchain/linux-toolchain.xml b/toolchain/linux-toolchain.xml
index ed0880532..082702c07 100644
--- a/toolchain/linux-toolchain.xml
+++ b/toolchain/linux-toolchain.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx
index d6b42f513..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", m64 ? "Linux64":"Linux");
+ defines.set("BINDIR", arm64 ? "LinuxArm64" : armv7 ? "LinuxArm" : m64 ? "Linux64" : "Linux");
}
}
else if ( (new EReg("mac","i")).match(os) )