diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 8ce8855abd..146479cc08 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -512,3 +512,4 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/build_variables.mk) $(call inherit-product,$(SRC_TARGET_DIR)/product/updatable_apex.mk) $(call soong_config_set, bionic, large_system_property_node, $(RELEASE_LARGE_SYSTEM_PROPERTY_NODE)) +$(call soong_config_set, Aconfig, read_from_new_storage, $(RELEASE_READ_FROM_NEW_STORAGE)) diff --git a/tools/aconfig/aconfig_storage_read_api/Android.bp b/tools/aconfig/aconfig_storage_read_api/Android.bp index 3b124b15c1..5e9eb54d48 100644 --- a/tools/aconfig/aconfig_storage_read_api/Android.bp +++ b/tools/aconfig/aconfig_storage_read_api/Android.bp @@ -104,6 +104,33 @@ cc_library { afdo: true, } +soong_config_module_type { + name: "aconfig_lib_cc_shared_link_defaults", + module_type: "cc_defaults", + config_namespace: "Aconfig", + bool_variables: [ + "read_from_new_storage", + ], + properties: [ + "shared_libs", + ], +} + +soong_config_bool_variable { + name: "read_from_new_storage", +} + +aconfig_lib_cc_shared_link_defaults { + name: "aconfig_lib_cc_shared_link.defaults", + soong_config_variables: { + read_from_new_storage: { + shared_libs: [ + "libaconfig_storage_read_api_cc", + ], + }, + }, +} + cc_defaults { name: "aconfig_lib_cc_static_link.defaults", shared_libs: [