From 64b0f14ecc1f33d86beb5c094f7ab31901ce6a77 Mon Sep 17 00:00:00 2001 From: Hao Zheng Date: Fri, 20 Dec 2024 22:20:33 +0000 Subject: [PATCH] Define ANDROID_ABI in Cobalt b/385380562 --- cobalt/user_agent/BUILD.gn | 11 +++++++++++ .../arm/platform_configuration/configuration.gni | 1 - .../arm64/platform_configuration/configuration.gni | 1 - .../x86/platform_configuration/configuration.gni | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cobalt/user_agent/BUILD.gn b/cobalt/user_agent/BUILD.gn index e019640ad639..21fa26c5ebc3 100644 --- a/cobalt/user_agent/BUILD.gn +++ b/cobalt/user_agent/BUILD.gn @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (is_android) { + import("//build/config/android/abi.gni") +} + static_library("user_agent") { sources = [ "user_agent_platform_info.cc", @@ -24,4 +28,11 @@ static_library("user_agent") { "//starboard/common", "//v8:v8_version", ] + + if (is_android) { + defines = [ + # Enable compile-time decisions based on the ABI + "ANDROID_ABI=$android_app_abi", + ] + } } diff --git a/starboard/android/arm/platform_configuration/configuration.gni b/starboard/android/arm/platform_configuration/configuration.gni index 77e2920e49a6..1cfa2ddb08c1 100644 --- a/starboard/android/arm/platform_configuration/configuration.gni +++ b/starboard/android/arm/platform_configuration/configuration.gni @@ -14,7 +14,6 @@ import("//starboard/android/shared/platform_configuration/configuration.gni") -android_abi = "armeabi-v7a" arm_float_abi = "softfp" sb_evergreen_compatible_package = true diff --git a/starboard/android/arm64/platform_configuration/configuration.gni b/starboard/android/arm64/platform_configuration/configuration.gni index 34daf92deb12..12583a39a513 100644 --- a/starboard/android/arm64/platform_configuration/configuration.gni +++ b/starboard/android/arm64/platform_configuration/configuration.gni @@ -14,6 +14,5 @@ import("//starboard/android/shared/platform_configuration/configuration.gni") -android_abi = "arm64-v8a" sabi_path = "//starboard/sabi/arm64/sabi-v$sb_api_version.json" sb_evergreen_compatible_package = true diff --git a/starboard/android/x86/platform_configuration/configuration.gni b/starboard/android/x86/platform_configuration/configuration.gni index 7b1100758777..3754e8c889b8 100644 --- a/starboard/android/x86/platform_configuration/configuration.gni +++ b/starboard/android/x86/platform_configuration/configuration.gni @@ -14,7 +14,6 @@ import("//starboard/android/shared/platform_configuration/configuration.gni") -android_abi = "x86" sabi_path = "//starboard/sabi/x86/sabi-v$sb_api_version.json" sb_enable_opus_sse = false