From 5b1d149586c313cf4942d8288e4b8122e5b02c07 Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Tue, 1 Jun 2021 23:59:23 +0900 Subject: [PATCH] RRO shouldn't depend on frameworks or system(_ext) app when TARGET_BUILD_UNBUNDLED In the case of unbundled build, the module in vendor should use system(_ext) module by prebuilt one. But RRO depends on system module directly depending on some conditions(packages exporting resources) In this change, 1. Temporarily make LOCAL_RES_LIBRARIES empty(For now, auto generated RRO doesn't use overlaid package's resources), enable it when prebuilts are ready. 2. According to (1), its SDK_VERSION can be current) Bug: 187404676 Test: TARGET_BUILD_UNBUNDLED_IMAGE m vendorimage, and check if there is no build error regarding RRO. Change-Id: I94e3122372dd20c942b2c858070a6ca797312792 Merged-In: I94e3122372dd20c942b2c858070a6ca797312792 (cherry picked from commit f93c13d51bff2478d4bcf48c808bc78a5ce0b989) --- core/generate_enforce_rro.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk index 6a23aeb393..9079981856 100644 --- a/core/generate_enforce_rro.mk +++ b/core/generate_enforce_rro.mk @@ -29,9 +29,12 @@ $(rro_android_manifest_file): build/make/tools/generate-enforce-rro-android-mani LOCAL_PATH:= $(intermediates) +# TODO(b/187404676): remove this condition when the prebuilt for packges exporting resource exists. +ifeq (,$(TARGET_BUILD_UNBUNDLED)) ifeq ($(enforce_rro_use_res_lib),true) LOCAL_RES_LIBRARIES := $(enforce_rro_source_module) endif +endif LOCAL_FULL_MANIFEST_FILE := $(rro_android_manifest_file) @@ -45,8 +48,9 @@ else ifeq (vendor,$(enforce_rro_partition)) else $(error Unsupported partition. Want: [vendor/product] Got: [$(enforce_rro_partition)]) endif - -ifneq (,$(LOCAL_RES_LIBRARIES)) +ifneq (,$(TARGET_BUILD_UNBUNDLED)) + LOCAL_SDK_VERSION := current +else ifneq (,$(LOCAL_RES_LIBRARIES)) # Technically we are linking against the app (if only to grab its resources), # and because it's potentially not building against the SDK, we can't either. LOCAL_PRIVATE_PLATFORM_APIS := true