aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2018-04-25 23:46:28 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-04-25 23:46:28 +0000
commit5f7e4f6bbf9630dd4f6235c6327771e60548df51 (patch)
tree6dd4a4258bdb998d682be9620819e835950f4d50
parent29adef4ec2dac322ca609e743fddfbcca9b4dd10 (diff)
parentd71fbfc1a7525a7f0781e15d187393498cf4431b (diff)
downloadbuild-android-n-iot-release-lg-thinq-wk7.tar.gz
Merge "Add .vendor to LOCAL_REQUIRED_MODULES for vendor"android-n-iot-release-lg-thinq-wk7
-rw-r--r--core/base_rules.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index ec04f149a3..63c6c52627 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -682,11 +682,32 @@ ifdef LOCAL_PICKUP_FILES
ALL_MODULES.$(my_register_name).PICKUP_FILES := \
$(ALL_MODULES.$(my_register_name).PICKUP_FILES) $(LOCAL_PICKUP_FILES)
endif
+
my_required_modules := $(LOCAL_REQUIRED_MODULES) \
$(LOCAL_REQUIRED_MODULES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
ifdef LOCAL_IS_HOST_MODULE
my_required_modules += $(LOCAL_REQUIRED_MODULES_$($(my_prefix)OS))
endif
+
+###############################################################################
+## When compiling against the VNDK, add the .vendor suffix to required modules.
+###############################################################################
+ifneq ($(LOCAL_USE_VNDK),)
+ ####################################################
+ ## Soong modules may be built twice, once for /system
+ ## and once for /vendor. If we're using the VNDK,
+ ## switch all soong libraries over to the /vendor
+ ## variant.
+ ####################################################
+ ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
+ # We don't do this renaming for soong-defined modules since they already
+ # have correct names (with .vendor suffix when necessary) in their
+ # LOCAL_*_LIBRARIES.
+ my_required_modules := $(foreach l,$(my_required_modules),\
+ $(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
+ endif
+endif
+
ALL_MODULES.$(my_register_name).REQUIRED := \
$(strip $(ALL_MODULES.$(my_register_name).REQUIRED) $(my_required_modules))
ALL_MODULES.$(my_register_name).EXPLICITLY_REQUIRED := \