Skip to content

Commit

Permalink
Dev funkin arm64 (#5)
Browse files Browse the repository at this point in the history
* Fix curl static linking on mac

This was overlooked in openfl#1682

* prepare for Lime 8.1.3

* tools: allow -x86_64 and -x86_32 as command line flags to select those architectures instead of defaults (closes openfl#1819)

Still supports -32 and -64, though, for backwards compatibility. We could consider removing those in Lime 9.

* release date

---------

Co-authored-by: Tobiasz Laskowski <tobil4sk@outlook.com>
Co-authored-by: Chris Speciale <christopher.gaf@gmail.com>
Co-authored-by: Josh Tynjala <joshtynjala@bowlerhat.dev>
  • Loading branch information
4 people authored Jul 29, 2024
1 parent a393a54 commit 29b5e81
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 16 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
Changelog
=========

8.1.3 (07/22/2024)
------------------

* Fixed Unicode conversion issues with various APIs, including as clipboard, window text, file dialogs, and fonts.
* Fixed Android builds with the `-emulator` flag that broke when using newer Android SDKs.
* Fixed "Could not link to neko" error message on macOS when lime.ndll is built with Xcode 15.
* Fixed system environment variables with the same name as common targets conflicting with other targets.
* Fixed `<echo/>` and `<log/>` output confusing Haxe's completion server. Now skipped when `display` is defined.
* Fixed `Clipboard.text` incorrectly getting cleared to null when targeting HTML5.
* Fixed integer value parsing in _project.xml_, including immediately reporting errors for invalid values.
* Fixed incorrect path discovery for NDLL files that found source directory instead.
* Fixed missing error message if HXP project class name does not match file name.
* Fixed unspecified behavior from `null` keys in `ObjectPool`.
* Fixed some issues when running Haxe built natively for Apple Silicon.
* Fixed missing cancellation of vibration on Android when app is paused or destroyed.
* Fixed static linking of native curl library on macOS.
* Fixed deprecation warnings in Android Gradle builds.

8.1.2 (03/13/2024)
------------------

Expand Down
2 changes: 1 addition & 1 deletion haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tags": [],
"description": "A foundational Haxe framework for cross-platform development",
"version": "8.2.0",
"releasenote": "Update HashLink, iOS and Android build fixes, and ongoing improvements",
"releasenote": "Various bug fixes",
"contributors": [
"singmajesty",
"bowlerhat",
Expand Down
2 changes: 1 addition & 1 deletion src/lime/tools/IOSHelper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class IOSHelper

if (project.targetFlags.exists("simulator"))
{
if (project.targetFlags.exists("i386") || project.targetFlags.exists("32"))
if (project.targetFlags.exists("i386") || project.targetFlags.exists("32") || project.targetFlags.exists("x86_32"))
{
commands.push("-arch");
commands.push("i386");
Expand Down
1 change: 1 addition & 0 deletions templates/cpp/static/BuildMain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<vflag name="-framework" value="Carbon" />
<vflag name="-framework" value="AppKit" />
<vflag name="-framework" value="OpenAL"/>
<vflag name="-framework" value="SystemConfiguration"/>

<lib name="/opt/local/lib/libgc.a" if="LIME_NEKO" />
<lib name="-lm" if="LIME_NEKO" />
Expand Down
10 changes: 5 additions & 5 deletions tools/CommandLineTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -997,12 +997,12 @@ class CommandLineTools
if (isBuildCommand)
{
Log.println(" \x1b[3m(windows|mac|linux|android)\x1b[0m \x1b[1m-static\x1b[0m -- Compile as a static C++ executable");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-32\x1b[0m -- Compile for 32-bit instead of the OS default");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-64\x1b[0m -- Compile for 64-bit instead of the OS default");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-x86_32\x1b[0m -- Compile for x86_32 instead of the OS default");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-x86_64\x1b[0m -- Compile for x86_64 instead of the OS default");
Log.println(" \x1b[3m(ios|android)\x1b[0m \x1b[1m-armv6\x1b[0m -- Compile for ARMv6 instead of the OS defaults");
Log.println(" \x1b[3m(ios|android)\x1b[0m \x1b[1m-armv7\x1b[0m -- Compile for ARMv7 instead of the OS defaults");
Log.println(" \x1b[3m(ios|android)\x1b[0m \x1b[1m-armv7s\x1b[0m -- Compile for ARMv7s instead of the OS defaults");
Log.println(" \x1b[3m(ios)\x1b[0m \x1b[1m-arm64\x1b[0m -- Compile for ARM64 instead of the OS defaults");
Log.println(" \x1b[3m(mac|ios|android)\x1b[0m \x1b[1m-arm64\x1b[0m -- Compile for ARM64 instead of the OS defaults");
Log.println(" \x1b[3m(ios)\x1b[0m \x1b[1m-nosign\x1b[0m -- Compile executable, but skip codesigning");
}

Expand Down Expand Up @@ -2245,11 +2245,11 @@ class CommandLineTools
}
catch (e:Dynamic) {}
}
else if (argument == "-64")
else if (argument == "-64" || argument == "-x86_64")
{
overrides.architectures.push(Architecture.X64);
}
else if (argument == "-32")
else if (argument == "-32" || argument == "-x86_32")
{
overrides.architectures.push(Architecture.X86);
}
Expand Down
6 changes: 3 additions & 3 deletions tools/platforms/LinuxPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class LinuxPlatform extends PlatformTarget

for (architecture in project.architectures)
{
if (!targetFlags.exists("32") && architecture == Architecture.X64)
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32") && architecture == Architecture.X64)
{
is64 = true;
}
Expand Down Expand Up @@ -507,12 +507,12 @@ class LinuxPlatform extends PlatformTarget
}
else
{
if (!targetFlags.exists("32") && System.hostArchitecture == X64)
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32") && System.hostArchitecture == X64)
{
commands.push(["-Dlinux", "-DHXCPP_M64"]);
}

if (!targetFlags.exists("64") && (command == "rebuild" || System.hostArchitecture == X86))
if (!targetFlags.exists("64") && !targetFlags.exists("x86_64") && (command == "rebuild" || System.hostArchitecture == X86))
{
commands.push(["-Dlinux", "-DHXCPP_M32"]);
}
Expand Down
4 changes: 2 additions & 2 deletions tools/platforms/MacPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class MacPlatform extends PlatformTarget
{
commands.push(["-Dmac", "-DHXCPP_CLANG", "-DHXCPP_ARM64"]);
}
else if (!targetFlags.exists("32"))
else if (!targetFlags.exists("32") && !targetFlags.exists("x86_32"))
{
commands.push(["-Dmac", "-DHXCPP_CLANG", "-DHXCPP_M64"]);
}
Expand All @@ -443,7 +443,7 @@ class MacPlatform extends PlatformTarget
// hashlink doesn't support arm64 macs yet
commands.push(["-Dmac", "-DHXCPP_CLANG", "-DHXCPP_ARCH=x86_64", "-Dhashlink"]);
}
else if (targetFlags.exists("64"))
else if (targetFlags.exists("64") || targetFlags.exists("x86_64"))
{
commands.push(["-Dmac", "-DHXCPP_CLANG", "-DHXCPP_ARCH=x86_64"]);
}
Expand Down
9 changes: 5 additions & 4 deletions tools/platforms/WindowsPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class WindowsPlatform extends PlatformTarget
else if (project.targetFlags.exists("hl") || targetFlags.exists("hlc"))
{
targetType = "hl";
is64 = !project.flags.exists("32");
is64 = !project.flags.exists("32") && !project.flags.exists("x86_32");
}
else if (project.targetFlags.exists("cppia"))
{
Expand Down Expand Up @@ -737,7 +737,8 @@ class WindowsPlatform extends PlatformTarget
if (targetType == "hl")
{
// default to 64 bit, just like upstream Hashlink releases
if (!targetFlags.exists("32") && (System.hostArchitecture == X64 || targetFlags.exists("64")))
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32")
&& (System.hostArchitecture == X64 || targetFlags.exists("64") || targetFlags.exists("x86_64")))
{
commands.push(["-Dwindows", "-DHXCPP_M64", "-Dhashlink"]);
}
Expand All @@ -748,7 +749,7 @@ class WindowsPlatform extends PlatformTarget
}
else
{
if (!targetFlags.exists("64")
if (!targetFlags.exists("64") && !targetFlags.exists("x86_64")
&& (command == "rebuild" || System.hostArchitecture == X86 || (targetType != "cpp" && targetType != "winrt")))
{
if (targetType == "winrt")
Expand All @@ -765,7 +766,7 @@ class WindowsPlatform extends PlatformTarget
// as previous Windows builds. For now, force -64 to be done last
// so that it can be debugged in a default "rebuild"

if (!targetFlags.exists("32")
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32")
&& System.hostArchitecture == X64
&& (command != "rebuild" || targetType == "cpp" || targetType == "winrt"))
{
Expand Down

0 comments on commit 29b5e81

Please sign in to comment.