Add LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES.

This allows a module to avoid being installed to the common library
directory.

Test: Prevents copying of NDK libraries with the NDK sysroot patches.
Bug: http://b/27533932
Change-Id: I24f11d5a70595bcd524ac5bd85034c226d2de211
This commit is contained in:
Dan Albert 2016-07-20 11:02:18 -07:00
parent 653980bfe4
commit 4ac4231ca1
2 changed files with 13 additions and 3 deletions

View File

@ -199,6 +199,7 @@ LOCAL_NOTICE_FILE:=
# to avoid installing the presigned apks with classes.dex unstripped.
LOCAL_REPLACE_PREBUILT_APK_INSTALLED:=
LOCAL_NDK_VERSION:=current
LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES:=
LOCAL_LOGTAGS_FILES:=
# arch specific variables

View File

@ -46,9 +46,18 @@ my_pack_module_relocations := $(firstword \
$(LOCAL_PACK_MODULE_RELOCATIONS))
ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS))
# LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES indicates that this prebuilt should be
# installed to the common directory of libraries. This is needed for the NDK
# shared libraries built by soong, as we build many different versions of each
# library (one for each API level). Since they all have the same basename,
# they'd clobber each other (as well as any platform libraries by the same
# name).
ifneq ($(LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES),false)
# Put the built targets of all shared libraries in a common directory
# to simplify the link line.
OVERRIDE_BUILT_MODULE_PATH := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
OVERRIDE_BUILT_MODULE_PATH := \
$($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
endif
ifeq ($(LOCAL_IS_HOST_MODULE)$(my_strip_module),)
# Strip but not try to add debuglink
my_strip_module := no_debuglink