Merge "Add LOCAL_OVERRIDES_MODULES"

am: f1610d82f9

Change-Id: I5af8bf3eb789574aa804403de4d946552c9b9fbd
This commit is contained in:
Jiyong Park 2017-06-22 04:52:39 +00:00 committed by android-build-merger
commit 9089f867d4
3 changed files with 16 additions and 0 deletions

View file

@ -243,6 +243,18 @@ intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX),$(
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
generated_sources_dir := $(call local-generated-sources-dir)
ifneq ($(LOCAL_OVERRIDES_MODULES),)
ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES)
ifndef LOCAL_IS_HOST_MODULE
EXECUTABLES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_MODULES))
else
$(call pretty-error,host modules cannot use LOCAL_OVERRIDES_MODULES)
endif
else
$(call pretty-error,LOCAL_MODULE_CLASS := $(LOCAL_MODULE_CLASS) cannot use LOCAL_OVERRIDES_MODULES)
endif
endif
###########################################################
# Pick a name for the intermediate and final targets
###########################################################

View file

@ -171,6 +171,7 @@ LOCAL_NOTICE_FILE:=
LOCAL_ODM_MODULE:=
LOCAL_OEM_MODULE:=
LOCAL_OVERRIDES_PACKAGES:=
LOCAL_OVERRIDES_MODULES:=
LOCAL_PACKAGE_NAME:=
LOCAL_PACKAGE_SPLITS:=
LOCAL_PACK_MODULE_RELOCATIONS:=

View file

@ -768,6 +768,9 @@ ifdef FULL_BUILD
# Filter out the overridden packages before doing expansion
product_MODULES := $(filter-out $(foreach p, $(product_MODULES), \
$(PACKAGES.$(p).OVERRIDES)), $(product_MODULES))
# Filter out executables as well
product_MODULES := $(filter-out $(foreach m, $(product_MODULES), \
$(EXECUTABLES.$(m).OVERRIDES)), $(product_MODULES))
# Resolve the :32 :64 module name
modules_32 := $(patsubst %:32,%,$(filter %:32, $(product_MODULES)))