Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/hx/Lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,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");
Expand All @@ -454,7 +458,7 @@ String __hxcpp_get_dll_extension()
HX_CSTRING(".sim.dylib");
#elif defined(__APPLE__)
HX_CSTRING(".dylib");
#elif defined(ANDROID) || defined(GPH) || defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN) || defined(TIZEN)
#elif defined(ANDROID) || defined(GPH) || defined(WEBOS) || defined(BLACKBERRY) || defined(EMSCRIPTEN) || defined(TIZEN)
HX_CSTRING(".so");
#else
HX_CSTRING(".dso");
Expand Down
4 changes: 2 additions & 2 deletions toolchain/linux-toolchain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<set name="noM32" value="1" if="HXCPP_NO_M32" />
<set name="noM32" value="1" if="HXCPP_M64" />
<set name="noM32" value="1" if="rpi" />
<set name="noM32" value="1" if="HXCPP_ARM64" />
<set name="noM64" value="1" if="HXCPP_ARM64" />
<set name="noM32" value="1" if="HXCPP_ARM64 || HXCPP_ARMV7" />
<set name="noM64" value="1" if="HXCPP_ARM64 || HXCPP_ARMV7" />

<compiler id="linux" exe="g++" if="linux">
<exe name="${CXX}" if="CXX" />
Expand Down
12 changes: 8 additions & 4 deletions tools/hxcpp/BuildTool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class BuildTool
var mNvccLinkFlags:Array<String>;
var mDirtyList:Array<String>;
var arm64:Bool;
var armv7:Bool;
var m64:Bool;
var m32:Bool;
var defaultCStandard:Null<Int>;
Expand Down Expand Up @@ -138,15 +139,17 @@ class BuildTool
m64 = mDefines.exists("HXCPP_M64");
m32 = mDefines.exists("HXCPP_M32") || mDefines.exists("HXCPP_X86");
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)
{
m64 = arch=="x86_64";
m32 = arch=="x86";
arm64 = arch=="arm64";
armv7 = arch=="armv7";
}
else
{
Expand All @@ -156,6 +159,7 @@ class BuildTool
m64 = hostArch=="m64";
m32 = hostArch=="m32";
arm64 = hostArch=="arm64";
armv7 = hostArch=="armv7";
}

mDefines.remove(m32 ? "HXCPP_M64" : "HXCPP_M32");
Expand Down Expand Up @@ -2138,7 +2142,7 @@ class BuildTool
defines.set("toolchain","linux");
defines.set("linux","linux");

if (defines.exists("HXCPP_LINUX_ARMV7"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be ok to remove this for hxcpp 5, but until then it would be best to avoid the breaking change and to continue to respect this define.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it.

if (armv7 || defines.exists("HXCPP_LINUX_ARMV7"))
{
defines.set("noM32","1");
defines.set("noM64","1");
Expand All @@ -2152,7 +2156,7 @@ class BuildTool
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) )
Expand Down