From c47911812d2ce36b11a06df80cbbdb2a5f6fd22b Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 6 Sep 2018 12:03:08 -0700 Subject: [PATCH] Use vendor variants of Soong header libraries for vendor modules Mark Soong header libraries with vendor variants as SPLIT_VENDOR so that Make will use the vendor variant for vendor modules. Bug: 114238698 Test: m checkbuild Change-Id: I912ab9f4e19d73a1213d60b9795ee30ca87ef614 --- core/header_library_internal.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/header_library_internal.mk b/core/header_library_internal.mk index 35ee1bc032..3e4958fb41 100644 --- a/core/header_library_internal.mk +++ b/core/header_library_internal.mk @@ -11,6 +11,16 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),) $(error $(LOCAL_PATH): Cannot set module stem for a library) endif +ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)) + ifdef LOCAL_USE_VNDK + name_without_suffix := $(patsubst %.vendor,%,$(LOCAL_MODULE)) + ifneq ($(name_without_suffix),$(LOCAL_MODULE)) + SPLIT_VENDOR.$(LOCAL_MODULE_CLASS).$(name_without_suffix) := 1 + endif + name_without_suffix := + endif +endif + include $(BUILD_SYSTEM)/binary.mk ifneq ($(strip $(all_objects)),)