Merge "make: Add support to skip current VNDK install"

This commit is contained in:
Treehugger Robot 2019-05-25 00:16:31 +00:00 committed by Gerrit Code Review
commit a0ee5dee5c
4 changed files with 17 additions and 3 deletions

View File

@ -269,6 +269,7 @@ LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=
LOCAL_SOONG_SYMBOL_PATH := LOCAL_SOONG_SYMBOL_PATH :=
LOCAL_SOONG_TOC := LOCAL_SOONG_TOC :=
LOCAL_SOONG_UNSTRIPPED_BINARY := LOCAL_SOONG_UNSTRIPPED_BINARY :=
LOCAL_SOONG_VNDK_VERSION :=
# '',true # '',true
LOCAL_SOURCE_FILES_ALL_GENERATED:= LOCAL_SOURCE_FILES_ALL_GENERATED:=
LOCAL_SRC_FILES:= LOCAL_SRC_FILES:=

View File

@ -61,6 +61,9 @@ else
# device-obj or host-obj. # device-obj or host-obj.
module_installed_filename := \ module_installed_filename := \
$(patsubst $(PRODUCT_OUT)/%,%,$($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_SHARED_LIBRARIES))/$(notdir $(LOCAL_BUILT_MODULE)) $(patsubst $(PRODUCT_OUT)/%,%,$($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_SHARED_LIBRARIES))/$(notdir $(LOCAL_BUILT_MODULE))
else ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
# Shared modules may be uninstallable(e.g. TARGET_SKIP_CURRENT_VNDK=true)
module_installed_filename :=
else else
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
# Stick the static java libraries with the regular java libraries. # Stick the static java libraries with the regular java libraries.

View File

@ -3,6 +3,7 @@
# LOCAL_SOONG_LINK_TYPE # LOCAL_SOONG_LINK_TYPE
# LOCAL_SOONG_TOC # LOCAL_SOONG_TOC
# LOCAL_SOONG_UNSTRIPPED_BINARY # LOCAL_SOONG_UNSTRIPPED_BINARY
# LOCAL_SOONG_VNDK_VERSION : means the version of VNDK where this module belongs
ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
$(call pretty-error,soong_cc_prebuilt.mk may only be used from Soong) $(call pretty-error,soong_cc_prebuilt.mk may only be used from Soong)
@ -51,6 +52,13 @@ ifndef LOCAL_UNINSTALLABLE_MODULE
endif endif
endif endif
# Don't install modules of current VNDK when it is told so
ifeq ($(TARGET_SKIP_CURRENT_VNDK),true)
ifeq ($(LOCAL_SOONG_VNDK_VERSION),$(PLATFORM_VNDK_VERSION))
LOCAL_UNINSTALLABLE_MODULE := true
endif
endif
####################################### #######################################
include $(BUILD_SYSTEM)/base_rules.mk include $(BUILD_SYSTEM)/base_rules.mk
####################################### #######################################

View File

@ -46,6 +46,8 @@ else ifeq ($(TARGET_BUILD_PDK),true)
# b/118634643: don't check VNDK lib list when building PDK. Some libs (libandroid_net.so # b/118634643: don't check VNDK lib list when building PDK. Some libs (libandroid_net.so
# and some render-script related ones) can't be built in PDK due to missing frameworks/base. # and some render-script related ones) can't be built in PDK due to missing frameworks/base.
check-vndk-list: ; check-vndk-list: ;
else ifeq ($(TARGET_SKIP_CURRENT_VNDK),true)
check-vndk-list: ;
else else
check-vndk-list: $(check-vndk-list-timestamp) check-vndk-list: $(check-vndk-list-timestamp)
endif endif
@ -100,11 +102,11 @@ ifneq ($(BOARD_VNDK_VERSION),)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := vndk_package LOCAL_MODULE := vndk_package
LOCAL_REQUIRED_MODULES := \ LOCAL_REQUIRED_MODULES := \
$(LLNDK_LIBRARIES) \ $(LLNDK_LIBRARIES)
llndk.libraries.txt \
vndksp.libraries.txt
ifneq ($(TARGET_SKIP_CURRENT_VNDK),true) ifneq ($(TARGET_SKIP_CURRENT_VNDK),true)
LOCAL_REQUIRED_MODULES += \ LOCAL_REQUIRED_MODULES += \
llndk.libraries.txt \
vndksp.libraries.txt \
$(addsuffix .vendor,$(VNDK_CORE_LIBRARIES)) \ $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES)) \
$(addsuffix .vendor,$(VNDK_SAMEPROCESS_LIBRARIES)) $(addsuffix .vendor,$(VNDK_SAMEPROCESS_LIBRARIES))
endif endif