Merge "Dedup lists of NDK libraries from Soong." am: 0ee038dffa

Original change: https://android-review.googlesource.com/c/platform/build/+/1353644

Change-Id: I595981758ea45d8646567c13963e3bf79e9535a2
This commit is contained in:
Treehugger Robot 2020-07-02 02:29:20 +00:00 committed by Automerger Merge Worker
commit 03c37a44fa
2 changed files with 4 additions and 5 deletions

View file

@ -286,8 +286,7 @@ else # LOCAL_IS_HOST_MODULE
endif
ifneq ($(LOCAL_SDK_VERSION),)
my_all_ndk_libraries := \
$(NDK_MIGRATED_LIBS) $(addprefix lib,$(NDK_PREBUILT_SHARED_LIBRARIES))
my_all_ndk_libraries := $(NDK_KNOWN_LIBS)
my_ndk_shared_libraries := \
$(filter $(my_all_ndk_libraries),\
$(my_shared_libraries) $(my_system_shared_libraries))
@ -1354,7 +1353,7 @@ my_system_shared_libraries_fullpath := \
# lists and use addprefix.
my_ndk_shared_libraries_fullpath := \
$(foreach _lib,$(my_ndk_shared_libraries),\
$(if $(filter $(NDK_MIGRATED_LIBS),$(_lib)),\
$(if $(filter $(NDK_KNOWN_LIBS),$(_lib)),\
$(my_built_ndk_libs)/$(_lib)$(so_suffix),\
$(my_ndk_sysroot_lib)/$(_lib)$(so_suffix)))
@ -1555,7 +1554,7 @@ my_ldflags := $(filter-out -l%,$(my_ldlib_flags))
my_allowed_ldlibs :=
ifndef LOCAL_IS_HOST_MODULE
ifneq ($(LOCAL_SDK_VERSION),)
my_allowed_ldlibs := $(addprefix -l,$(NDK_PREBUILT_SHARED_LIBRARIES))
my_allowed_ldlibs := $(NDK_KNOWN_LIBS:lib%=-l%)
endif
else
my_allowed_ldlibs := $($(my_prefix)AVAILABLE_LIBRARIES)

View file

@ -65,7 +65,7 @@ ifneq ($(filter true keep_symbols no_debuglink mini-debug-info,$(my_strip_module
built_module := $(linked_module)
ifneq ($(LOCAL_SDK_VERSION),)
# binary.mk filters out NDK_MIGRATED_LIBS from my_shared_libs, thus those NDK libs are not added
# binary.mk filters out NDK_KNOWN_LIBS from my_shared_libs, thus those NDK libs are not added
# to DEPENDENCIES_ON_SHARED_LIBRARIES. Assign $(my_ndk_shared_libraries_fullpath) to
# my_check_elf_file_shared_lib_files so that check_elf_file.py can see those NDK stub libs.
my_check_elf_file_shared_lib_files := $(my_ndk_shared_libraries_fullpath)