Add config that controls if updatable BCP is included in dexpreopt.
For now the config is always set to false (updatable boot jars are
excluded), but this may change in the future.
Bug: 178467404
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I1b45a89748e065a29130efbf8b54dddfae69e48b
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index dda7de0..c68ea69 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -31,6 +31,10 @@
product/app/% \
product/priv-app/% \
+# Global switch control if updatable boot jars are included in dexpreopt.
+# Currently unconditionally set to true, this may change in the future.
+DEX_PREOPT_WITH_UPDATABLE_BCP := false
+
# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
ifeq (eng,$(TARGET_BUILD_VARIANT))
@@ -76,6 +80,7 @@
$(call add_json_bool, DisablePreoptBootImages, $(call invert_bool,$(ENABLE_PREOPT_BOOT_IMAGES)))
$(call add_json_list, DisablePreoptModules, $(DEXPREOPT_DISABLED_MODULES))
$(call add_json_bool, OnlyPreoptBootImageAndSystemServer, $(filter true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY)))
+ $(call add_json_bool, PreoptWithUpdatableBcp, $(filter true,$(DEX_PREOPT_WITH_UPDATABLE_BCP)))
$(call add_json_bool, UseArtImage, $(filter true,$(DEXPREOPT_USE_ART_IMAGE)))
$(call add_json_bool, DontUncompressPrivAppsDex, $(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))