From e31e220e2cc6d3af69422c0923d6b514e5bfc34e Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Sun, 22 Sep 2024 10:16:38 +0800 Subject: [PATCH] Do not use SIMD on android simulator. Allow only single arch when building for android --- acadnme/build.nmml | 1 + project/ToolkitBuild.xml | 17 ++++++++++------- tools/nme/src/platforms/AndroidPlatform.hx | 13 +++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/acadnme/build.nmml b/acadnme/build.nmml index 2800d624b..2530af4cd 100644 --- a/acadnme/build.nmml +++ b/acadnme/build.nmml @@ -65,6 +65,7 @@ + diff --git a/project/ToolkitBuild.xml b/project/ToolkitBuild.xml index 8d1389fcb..fc8b6a780 100644 --- a/project/ToolkitBuild.xml +++ b/project/ToolkitBuild.xml @@ -56,13 +56,16 @@ -
- - -
-
- - + +
+
+ + +
+
+ + +
diff --git a/tools/nme/src/platforms/AndroidPlatform.hx b/tools/nme/src/platforms/AndroidPlatform.hx index 6f78e8b2e..364548282 100644 --- a/tools/nme/src/platforms/AndroidPlatform.hx +++ b/tools/nme/src/platforms/AndroidPlatform.hx @@ -100,6 +100,19 @@ class AndroidPlatform extends Platform else if(project.androidConfig.ABIs.length == 0) { project.androidConfig.ABIs = ["armeabi-v7a", "arm64-v8a", "x86", "x86_64"]; + var explicitArch = [ "HXCPP_ARMV7", "HXCPP_ARM64", "HXCPP_X86", "HXCPP_X86_64" ]; + var hasDef = false; + for( e in explicitArch) + if (project.hasDef(e)) + hasDef = true; + if (hasDef) + { + var filtered = []; + for(i in 0...explicitArch.length) + if (project.hasDef(explicitArch[i])) + filtered.push( project.androidConfig.ABIs[i]); + project.androidConfig.ABIs = filtered; + } } project.architectures = [for(abi in project.androidConfig.ABIs) findArchitectureByName(abi)];