From a5511ea91aea719316fa5f1f19e1cbbe20529438 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 28 Feb 2023 18:10:23 -0800 Subject: [PATCH] Don't install jni libs for uninstallable modules Bug: 254205429 Test: Presubmits Change-Id: I6eec24f17bfeac0179558356e07a13dfb071a2bb --- core/soong_app_prebuilt.mk | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index 786a755b35..469a8f1bd7 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -162,19 +162,21 @@ $(LOCAL_BUILT_MODULE): | $(call copy-many-files, $(my_jni_lib_symbols_copy_files # embedded JNI will already have been handled by soong my_embed_jni := my_prebuilt_jni_libs := -ifdef LOCAL_SOONG_JNI_LIBS_$(TARGET_ARCH) - my_2nd_arch_prefix := - LOCAL_JNI_SHARED_LIBRARIES := $(LOCAL_SOONG_JNI_LIBS_$(TARGET_ARCH)) - partition_lib_pairs := $(LOCAL_SOONG_JNI_LIBS_PARTITION_$(TARGET_ARCH)) - include $(BUILD_SYSTEM)/install_jni_libs_internal.mk -endif -ifdef TARGET_2ND_ARCH - ifdef LOCAL_SOONG_JNI_LIBS_$(TARGET_2ND_ARCH) - my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) - LOCAL_JNI_SHARED_LIBRARIES := $(LOCAL_SOONG_JNI_LIBS_$(TARGET_2ND_ARCH)) - partition_lib_pairs := $(LOCAL_SOONG_JNI_LIBS_PARTITION_$(TARGET_2ND_ARCH)) +ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) + ifdef LOCAL_SOONG_JNI_LIBS_$(TARGET_ARCH) + my_2nd_arch_prefix := + LOCAL_JNI_SHARED_LIBRARIES := $(LOCAL_SOONG_JNI_LIBS_$(TARGET_ARCH)) + partition_lib_pairs := $(LOCAL_SOONG_JNI_LIBS_PARTITION_$(TARGET_ARCH)) include $(BUILD_SYSTEM)/install_jni_libs_internal.mk endif + ifdef TARGET_2ND_ARCH + ifdef LOCAL_SOONG_JNI_LIBS_$(TARGET_2ND_ARCH) + my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) + LOCAL_JNI_SHARED_LIBRARIES := $(LOCAL_SOONG_JNI_LIBS_$(TARGET_2ND_ARCH)) + partition_lib_pairs := $(LOCAL_SOONG_JNI_LIBS_PARTITION_$(TARGET_2ND_ARCH)) + include $(BUILD_SYSTEM)/install_jni_libs_internal.mk + endif + endif endif LOCAL_SHARED_JNI_LIBRARIES := my_embed_jni :=