From 3142e2949ddd0bb24f54ab00dbffceab40df7fe0 Mon Sep 17 00:00:00 2001 From: dimitry Date: Wed, 7 Nov 2018 10:39:34 +0100 Subject: [PATCH] Enable overrides for shared libraries Bug: http://b/114470065 Test: make Change-Id: I084c98ca2630ad3f56504ca0f7f08cff14483872 --- core/base_rules.mk | 10 ++++++---- core/main.mk | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 9c5c69d880..cb9c35ac5d 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -277,14 +277,16 @@ 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 + ifndef LOCAL_IS_HOST_MODULE + ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES) EXECUTABLES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_MODULES)) + else ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES) + SHARED_LIBRARIES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_MODULES)) else - $(call pretty-error,host modules cannot use LOCAL_OVERRIDES_MODULES) + $(call pretty-error,LOCAL_MODULE_CLASS := $(LOCAL_MODULE_CLASS) cannot use LOCAL_OVERRIDES_MODULES) endif else - $(call pretty-error,LOCAL_MODULE_CLASS := $(LOCAL_MODULE_CLASS) cannot use LOCAL_OVERRIDES_MODULES) + $(call pretty-error,host modules cannot use LOCAL_OVERRIDES_MODULES) endif endif diff --git a/core/main.mk b/core/main.mk index fdf14de5ad..bd75736475 100644 --- a/core/main.mk +++ b/core/main.mk @@ -965,7 +965,7 @@ $(foreach lt,$(ALL_LINK_TYPES),\ # Expand a list of modules to the modules that they override (if any) # $(1): The list of modules. define module-overrides -$(foreach m,$(1),$(PACKAGES.$(m).OVERRIDES) $(EXECUTABLES.$(m).OVERRIDES)) +$(foreach m,$(1),$(PACKAGES.$(m).OVERRIDES) $(EXECUTABLES.$(m).OVERRIDES) $(SHARED_LIBRARIES.$(m).OVERRIDES)) endef ###########################################################