From b2d5a9b5642d77fa08e83318cc250b5faaff8093 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Wed, 2 Sep 2026 19:48:41 +0100 Subject: [PATCH 1/3] Add exe linker for android This allows building shell binaries for android --- toolchain/android-toolchain-clang.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/toolchain/android-toolchain-clang.xml b/toolchain/android-toolchain-clang.xml index 1858b255d..6eb8bd559 100644 --- a/toolchain/android-toolchain-clang.xml +++ b/toolchain/android-toolchain-clang.xml @@ -106,7 +106,25 @@ - + + + + + + + + + + + + + + + + + + + - + From 27f02dd6f67c440968029158222c6f04f816b99f Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Wed, 2 Sep 2026 19:58:45 +0100 Subject: [PATCH 2/3] Set arm64 as default android architecture --- tools/hxcpp/BuildTool.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/hxcpp/BuildTool.hx b/tools/hxcpp/BuildTool.hx index 3be73b5c9..5c88eeb96 100644 --- a/tools/hxcpp/BuildTool.hx +++ b/tools/hxcpp/BuildTool.hx @@ -148,6 +148,10 @@ class BuildTool m32 = arch=="x86"; arm64 = arch=="arm64"; } + else if (mDefines.exists("android")) + { + arm64 = true; + } else { var hostArch = getArch(); From b001dcbd199eba44eda4890c8c57eadc55c2dc81 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Wed, 2 Sep 2026 20:01:42 +0100 Subject: [PATCH 3/3] [tests] Fix android std tests hxml 32 bit architectures are not supported on modern devices, so arm64 is a more sensible choice for this hxml. /data/local/tmp is writable by default, so it's better to use that instead of /storage. Let's also clean up after ourselves --- test/std/testAndroid.hxml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/std/testAndroid.hxml b/test/std/testAndroid.hxml index 7e7e1d0b6..cc427faf2 100644 --- a/test/std/testAndroid.hxml +++ b/test/std/testAndroid.hxml @@ -3,7 +3,8 @@ -D exe_link -L hx4compat -L utest ---cmd adb push arm32/Test /storage/ext_sd ---cmd adb push Test.hx /storage/ext_sd ---cmd adb shell "cd /storage/ext_sd && ./Test" ---cpp arm32 \ No newline at end of file +--cpp arm64 +--cmd adb push arm64/Test-64 /data/local/tmp +--cmd adb push Test.hx /data/local/tmp +--cmd adb shell "cd /data/local/tmp && ./Test-64" +--cmd adb shell "rm /data/local/tmp/Test{-64,.hx}"