From 851cba592930f6313ba90913897270cc456c8c40 Mon Sep 17 00:00:00 2001 From: Mauricio G Date: Mon, 14 Jul 2025 11:48:42 -0700 Subject: [PATCH] Update native_deps.bzl --- rules/native_deps.bzl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rules/native_deps.bzl b/rules/native_deps.bzl index 8f1265b56..fdb4d97bc 100644 --- a/rules/native_deps.bzl +++ b/rules/native_deps.bzl @@ -45,6 +45,18 @@ split_config_aspect = aspect( def _get_libs_dir_name(target_platform): name = target_platform.name + # Standarize the name give a platform. + # Plaform names not necessarily match exactly to a cpu architecture. + # If we use the plaform name directly, libs might end up packaged in the apk + # in a different directory that what is expected. + if "arm64" in name: + name = "arm64-v8a" + elif "arm" in name: + name = "armeabi-v7a" + elif "amd64" in name or "x86_64" in name: + name = "x86_64" + elif "x86" in name: + name = "x86" return name def _get_cc_link_params_infos(ctx, deps):