From dc017122fbd3304d5cbbdc274f4e9b477aebfb13 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 18 Mar 2019 17:59:27 +0000 Subject: [PATCH] Read product/device RRO dirs separately from soong This change splits the LOCAL_SOONG_RRO_DIRS into two, representing RRO dirs that originated from device and product overlay configs, respectively. Also plumb the device/product configs in separately. Bug: 127758779 Test: verify noop on presubmit targets Change-Id: Iddee1b4d7303b7ecaeced91216ea82fe29123770 --- core/clear_vars.mk | 3 ++- core/soong_app_prebuilt.mk | 4 ++-- core/soong_config.mk | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 1e3f6ae43..7485b8b50 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -263,7 +263,8 @@ LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR := LOCAL_SOONG_LINK_TYPE := LOCAL_SOONG_PROGUARD_DICT := LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE := -LOCAL_SOONG_RRO_DIRS := +LOCAL_SOONG_DEVICE_RRO_DIRS := +LOCAL_SOONG_PRODUCT_RRO_DIRS := LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES := LOCAL_SOONG_TOC := LOCAL_SOONG_UNSTRIPPED_BINARY := diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk index a9169eb81..cfcb0c609 100644 --- a/core/soong_app_prebuilt.mk +++ b/core/soong_app_prebuilt.mk @@ -159,13 +159,13 @@ my_common := COMMON include $(BUILD_SYSTEM)/link_type.mk endif # !LOCAL_IS_HOST_MODULE -ifdef LOCAL_SOONG_RRO_DIRS +ifneq (,$(LOCAL_SOONG_DEVICE_RRO_DIRS)$(LOCAL_SOONG_PRODUCT_RRO_DIRS)) $(call append_enforce_rro_sources, \ $(my_register_name), \ false, \ $(LOCAL_FULL_MANIFEST_FILE), \ $(if $(LOCAL_EXPORT_PACKAGE_RESOURCES),true,false), \ - $(LOCAL_SOONG_RRO_DIRS)) + $(LOCAL_SOONG_DEVICE_RRO_DIRS) $(LOCAL_SOONG_PRODUCT_RRO_DIRS)) endif SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE) diff --git a/core/soong_config.mk b/core/soong_config.mk index 3c82e8824..ddc8cf3d6 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -61,7 +61,8 @@ $(call add_json_str, CrossHost, $(HOST_CROSS_OS)) $(call add_json_str, CrossHostArch, $(HOST_CROSS_ARCH)) $(call add_json_str, CrossHostSecondaryArch, $(HOST_CROSS_2ND_ARCH)) -$(call add_json_list, ResourceOverlays, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS)) +$(call add_json_list, DeviceResourceOverlays, $(DEVICE_PACKAGE_OVERLAYS)) +$(call add_json_list, ProductResourceOverlays, $(PRODUCT_PACKAGE_OVERLAYS)) $(call add_json_list, EnforceRROTargets, $(PRODUCT_ENFORCE_RRO_TARGETS)) $(call add_json_list, EnforceRROExcludedOverlays, $(PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS))