forked from openkylin/platform_build
Make RRO packages for system_ext
Until now, packages from system_ext don't create RRO packages, instead it uses static overlay, but to make system_ext common, it should use RRO. Bug: 150820813 Test: m && check if there are RRO packages that use from system_ext apps Change-Id: Id0ddb66adca07a6bb4dda66fbee49fd476ac5342
This commit is contained in:
parent
47b08fbab5
commit
d99e77d6d6
|
@ -100,19 +100,19 @@ include $(BUILD_SYSTEM)/support_libraries.mk
|
|||
# Determine whether auto-RRO is enabled for this package.
|
||||
enforce_rro_enabled :=
|
||||
ifneq (,$(filter *, $(PRODUCT_ENFORCE_RRO_TARGETS)))
|
||||
# * means all system APKs, so enable conditionally based on module path.
|
||||
# * means all system and system_ext APKs, so enable conditionally based on module path.
|
||||
# Note that modules in PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS are excluded even if it is '*'
|
||||
|
||||
# Note that base_rules.mk has not yet been included, so it's likely that only
|
||||
# one of LOCAL_MODULE_PATH and the LOCAL_X_MODULE flags has been set.
|
||||
ifeq (,$(LOCAL_MODULE_PATH))
|
||||
non_system_module := $(filter true,\
|
||||
non_rro_target_module := $(filter true,\
|
||||
$(LOCAL_ODM_MODULE) \
|
||||
$(LOCAL_OEM_MODULE) \
|
||||
$(LOCAL_PRODUCT_MODULE) \
|
||||
$(LOCAL_SYSTEM_EXT_MODULE) \
|
||||
$(LOCAL_PROPRIETARY_MODULE) \
|
||||
$(LOCAL_VENDOR_MODULE))
|
||||
enforce_rro_enabled := $(if $(non_system_module),,true)
|
||||
enforce_rro_enabled := $(if $(non_rro_target_module),,true)
|
||||
else ifneq ($(filter $(TARGET_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
||||
enforce_rro_enabled := true
|
||||
endif
|
||||
|
@ -120,6 +120,12 @@ else ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_TARGETS)))
|
|||
enforce_rro_enabled := true
|
||||
endif
|
||||
|
||||
# TODO(b/150820813) Some modules depend on static overlay, remove this after eliminating the dependency.
|
||||
ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS)))
|
||||
enforce_rro_enabled :=
|
||||
endif
|
||||
|
||||
|
||||
product_package_overlays := $(strip \
|
||||
$(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
|
||||
$(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))))
|
||||
|
|
|
@ -193,6 +193,9 @@ _product_list_vars += PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS
|
|||
# Package list to apply enforcing RRO.
|
||||
_product_list_vars += PRODUCT_ENFORCE_RRO_TARGETS
|
||||
|
||||
# Packages to skip auto-generating RROs for when PRODUCT_ENFORCE_RRO_TARGETS is set to *.
|
||||
_product_list_vars += PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS
|
||||
|
||||
_product_list_vars += PRODUCT_SDK_ATREE_FILES
|
||||
_product_list_vars += PRODUCT_SDK_ADDON_NAME
|
||||
_product_list_vars += PRODUCT_SDK_ADDON_COPY_FILES
|
||||
|
|
|
@ -81,6 +81,7 @@ $(call add_json_str, CrossHostSecondaryArch, $(HOST_CROSS_2ND_ARCH))
|
|||
$(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, EnforceRROExemptedTargets, $(PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS))
|
||||
$(call add_json_list, EnforceRROExcludedOverlays, $(PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS))
|
||||
|
||||
$(call add_json_str, AAPTCharacteristics, $(TARGET_AAPT_CHARACTERISTICS))
|
||||
|
|
|
@ -125,6 +125,9 @@ PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
|
|||
|
||||
PRODUCT_ENFORCE_RRO_TARGETS := *
|
||||
|
||||
# TODO(b/150820813) Settings depends on static overlay, remove this after eliminating the dependency.
|
||||
PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS := Settings
|
||||
|
||||
PRODUCT_NAME := mainline_system
|
||||
PRODUCT_BRAND := generic
|
||||
|
||||
|
|
Loading…
Reference in New Issue