From 85471ed82e5ff8e84b2e8fb838d683b4e40f5d34 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 23 Jun 2020 16:46:38 +0900 Subject: [PATCH] pm.dexopt.* props in runtime_libart.mk becomes optional The mk file is designed to provide safe default values which can be overridden by target-specific mk files. Previously it was difficult to correctly configure the mk files because the final prop value that is baked in the system/build.prop is highly dependent (and sensitive as well) to the mk file inheritance order which is very difficult (and non-intuitive) to follow. I9c073a21c8257987cf2378012cadaeeeb698a4fb is an attempt to make it much easier and intuitive. Specifically, the new `a ?= b` syntax makes the assignment optional, which means it is used only when there is no non-optional assignment for the same prop regardless of the relative ordering among them. In addition, the change prohibits having multiple non-optional prop assignments for the same prop name. pm.dex.* prop in runtime_libart.mk are now set using the `a ?= b` syntax to explicitly mark that they provide default values. Bug: 117892318 Bug: 158735147 Test: m Exempt-From-Owner-Approval: cherry-pick from master Merged-In: I044486d313d699607cd54222ae34d9eae24762b9 (cherry picked from commit bca4ea477a7a7e854491e80b38fab9ebf621ce07) Change-Id: I044486d313d699607cd54222ae34d9eae24762b9 --- target/product/runtime_libart.mk | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index 78a4af09cc..b96601ddd3 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk @@ -57,23 +57,23 @@ PRODUCT_SYSTEM_PROPERTIES += \ # On eng builds, make "boot" reasons only extract for faster turnaround. ifeq (eng,$(TARGET_BUILD_VARIANT)) PRODUCT_SYSTEM_PROPERTIES += \ - pm.dexopt.first-boot=extract \ - pm.dexopt.boot=extract + pm.dexopt.first-boot?=extract \ + pm.dexopt.boot?=extract else PRODUCT_SYSTEM_PROPERTIES += \ - pm.dexopt.first-boot=quicken \ - pm.dexopt.boot=verify + pm.dexopt.first-boot?=quicken \ + pm.dexopt.boot?=verify endif # The install filter is speed-profile in order to enable the use of # profiles from the dex metadata files. Note that if a profile is not provided # or if it is empty speed-profile is equivalent to (quicken + empty app image). PRODUCT_SYSTEM_PROPERTIES += \ - pm.dexopt.install=speed-profile \ - pm.dexopt.bg-dexopt=speed-profile \ - pm.dexopt.ab-ota=speed-profile \ - pm.dexopt.inactive=verify \ - pm.dexopt.shared=speed + pm.dexopt.install?=speed-profile \ + pm.dexopt.bg-dexopt?=speed-profile \ + pm.dexopt.ab-ota?=speed-profile \ + pm.dexopt.inactive?=verify \ + pm.dexopt.shared?=speed # Pass file with the list of updatable boot class path packages to dex2oat. PRODUCT_SYSTEM_PROPERTIES += \