Merge "Don't build automatic RROs for tests"
This commit is contained in:
commit
4d4ffb28f4
2 changed files with 39 additions and 35 deletions
|
@ -111,24 +111,26 @@ 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 and system_ext APKs, so enable conditionally based on module path.
|
||||
ifeq (,$(filter tests,$(LOCAL_MODULE_TAGS)))
|
||||
ifneq (,$(filter *, $(PRODUCT_ENFORCE_RRO_TARGETS)))
|
||||
# * means all system and system_ext APKs, so enable conditionally based on module path.
|
||||
|
||||
# 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_rro_target_module := $(filter true,\
|
||||
$(LOCAL_ODM_MODULE) \
|
||||
$(LOCAL_OEM_MODULE) \
|
||||
$(LOCAL_PRODUCT_MODULE) \
|
||||
$(LOCAL_PROPRIETARY_MODULE) \
|
||||
$(LOCAL_VENDOR_MODULE))
|
||||
enforce_rro_enabled := $(if $(non_rro_target_module),,true)
|
||||
else ifneq ($(filter $(TARGET_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
||||
# 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_rro_target_module := $(filter true,\
|
||||
$(LOCAL_ODM_MODULE) \
|
||||
$(LOCAL_OEM_MODULE) \
|
||||
$(LOCAL_PRODUCT_MODULE) \
|
||||
$(LOCAL_PROPRIETARY_MODULE) \
|
||||
$(LOCAL_VENDOR_MODULE))
|
||||
enforce_rro_enabled := $(if $(non_rro_target_module),,true)
|
||||
else ifneq ($(filter $(TARGET_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
||||
enforce_rro_enabled := true
|
||||
endif
|
||||
else ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_TARGETS)))
|
||||
enforce_rro_enabled := true
|
||||
endif
|
||||
else ifneq (,$(filter $(LOCAL_PACKAGE_NAME), $(PRODUCT_ENFORCE_RRO_TARGETS)))
|
||||
enforce_rro_enabled := true
|
||||
endif
|
||||
|
||||
product_package_overlays := $(strip \
|
||||
|
|
|
@ -239,26 +239,28 @@ my_common := COMMON
|
|||
include $(BUILD_SYSTEM)/link_type.mk
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifdef LOCAL_SOONG_DEVICE_RRO_DIRS
|
||||
$(call append_enforce_rro_sources, \
|
||||
$(my_register_name), \
|
||||
false, \
|
||||
$(LOCAL_FULL_MANIFEST_FILE), \
|
||||
$(if $(LOCAL_EXPORT_PACKAGE_RESOURCES),true,false), \
|
||||
$(LOCAL_SOONG_DEVICE_RRO_DIRS), \
|
||||
vendor \
|
||||
)
|
||||
endif
|
||||
ifeq (,$(filter tests,$(LOCAL_MODULE_TAGS)))
|
||||
ifdef LOCAL_SOONG_DEVICE_RRO_DIRS
|
||||
$(call append_enforce_rro_sources, \
|
||||
$(my_register_name), \
|
||||
false, \
|
||||
$(LOCAL_FULL_MANIFEST_FILE), \
|
||||
$(if $(LOCAL_EXPORT_PACKAGE_RESOURCES),true,false), \
|
||||
$(LOCAL_SOONG_DEVICE_RRO_DIRS), \
|
||||
vendor \
|
||||
)
|
||||
endif
|
||||
|
||||
ifdef 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_PRODUCT_RRO_DIRS), \
|
||||
product \
|
||||
)
|
||||
ifdef 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_PRODUCT_RRO_DIRS), \
|
||||
product \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LOCAL_PREBUILT_COVERAGE_ARCHIVE
|
||||
|
@ -273,4 +275,4 @@ SOONG_ALREADY_CONV += $(LOCAL_MODULE)
|
|||
###########################################################
|
||||
## SBOM generation
|
||||
###########################################################
|
||||
include $(BUILD_SBOM_GEN)
|
||||
include $(BUILD_SBOM_GEN)
|
||||
|
|
Loading…
Reference in a new issue