From c5fa7396ba09bf829328ceb2dd8e0fcf9a97341f Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Wed, 3 Apr 2019 14:19:49 +0100 Subject: [PATCH] Mark jni libs as REQUIRED by their app This makes the dependencies of the jni lib .so appear in product_target_FILES. Previously, only the jni lib .so itself appeared, as an effect of being added to the INSTALLED files of the app. Bug: 129323707 Test: compare the output between `m dump-files` and installed-files.txt Test: noop in terms of build artifacts Change-Id: Ie391bb45ad7758e51368cabb1ecba5caeae2f09c --- core/install_jni_libs_internal.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/install_jni_libs_internal.mk b/core/install_jni_libs_internal.mk index 30bcc2c67..289d16fc6 100644 --- a/core/install_jni_libs_internal.mk +++ b/core/install_jni_libs_internal.mk @@ -57,9 +57,9 @@ else ifneq ($(my_jni_shared_libraries),) # not my_embed_jni # Make sure the JNI libraries get installed my_shared_library_path := $(call get_non_asan_path,\ $($(my_2nd_arch_prefix)TARGET_OUT$(partition_tag)_SHARED_LIBRARIES)) - my_installed_library := $(addprefix $(my_shared_library_path)/, $(my_jni_filenames)) - ALL_MODULES.$(my_register_name).INSTALLED += $(my_installed_library) + bit_suffix := $(if $(filter %64,$(TARGET_$(my_2nd_arch_prefix)ARCH)),:64,:32) + ALL_MODULES.$(my_register_name).REQUIRED_FROM_TARGET += $(addsuffix $(bit_suffix),$(LOCAL_JNI_SHARED_LIBRARIES)) # Create symlink in the app specific lib path # Skip creating this symlink when running the second part of a target sanitization build.