From 8b7ecc06c792c7d5048d654a9ddd30575a0f2c72 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 1 Oct 2018 16:23:53 +0100 Subject: [PATCH] Record installed JNI libs in INSTALLED files. The installed jni libs were previously not tracked in the way other installed files were. One problem with this is that the product-installed-files macro failed to track these files. Bug: 80410283 Test: build_test Change-Id: I85f528f228ef6921ed596d58303991a5370ae631 --- core/install_jni_libs_internal.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/install_jni_libs_internal.mk b/core/install_jni_libs_internal.mk index eb0b2f3576..e786691656 100644 --- a/core/install_jni_libs_internal.mk +++ b/core/install_jni_libs_internal.mk @@ -51,7 +51,9 @@ my_jni_filenames := $(notdir $(my_jni_shared_libraries)) my_shared_library_path := $(call get_non_asan_path,\ $($(my_2nd_arch_prefix)TARGET_OUT$(partition_tag)_SHARED_LIBRARIES)) # Do not use order-only dependency, because we want to rebuild the image if an jni is updated. -$(LOCAL_INSTALLED_MODULE) : $(addprefix $(my_shared_library_path)/, $(my_jni_filenames)) +my_installed_library := $(addprefix $(my_shared_library_path)/, $(my_jni_filenames)) +$(LOCAL_INSTALLED_MODULE) : $(my_installed_library) +ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(my_installed_library) # Create symlink in the app specific lib path # Skip creating this symlink when running the second part of a target sanitization build. @@ -96,7 +98,9 @@ else # not my_embed_jni $(foreach lib, $(my_prebuilt_jni_libs), \ $(eval $(call copy-one-file, $(lib), $(my_app_lib_path)/$(notdir $(lib))))) -$(LOCAL_INSTALLED_MODULE) : $(addprefix $(my_app_lib_path)/, $(notdir $(my_prebuilt_jni_libs))) +my_installed_library := $(addprefix $(my_app_lib_path)/, $(notdir $(my_prebuilt_jni_libs))) +$(LOCAL_INSTALLED_MODULE) : $(my_installed_library) +ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(my_installed_library) endif # my_embed_jni endif # inner my_prebuilt_jni_libs endif # outer my_prebuilt_jni_libs