Add LOCAL_PROVIDES_USES_LIBRARY and use it in module dexpreopt config.

The new variable stores the name of the <uses-library>, if for some
reason it is different than the name of the module for that library
(normally they are the same, but sometimes differ). If the variable is
undefined or defined to an empty string, the name of the <uses-library>
is considered to be the same as the name of its module. It is recorded
in a module's dexpreopt.config file as "ProvidesUsesLibrary" field.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Iac1be0fac79a944e4c26867cc58e274b76709da8
This commit is contained in:
Ulya Trafimovich 2021-01-06 17:56:15 +00:00
parent 1047a0a4be
commit 514d809b20
2 changed files with 2 additions and 0 deletions

View file

@ -243,6 +243,7 @@ LOCAL_PROTOC_FLAGS:=
# lite(default),micro,nano,stream,full,nanopb-c,nanopb-c-enable_malloc,nanopb-c-16bit,nanopb-c-enable_malloc-16bit,nanopb-c-32bit,nanopb-c-enable_malloc-32bit
LOCAL_PROTOC_OPTIMIZE_TYPE:=
LOCAL_PROTO_JAVA_OUTPUT_PARAMS:=
LOCAL_PROVIDES_USES_LIBRARY:=
LOCAL_R8_FLAG_FILES:=
LOCAL_RECORDED_MODULE_TYPE:=
LOCAL_RENDERSCRIPT_CC:=

View file

@ -253,6 +253,7 @@ ifdef LOCAL_DEX_PREOPT
$(call add_json_str, ProfileClassListing, $(if $(my_process_profile),$(LOCAL_DEX_PREOPT_PROFILE)))
$(call add_json_bool, ProfileIsTextListing, $(my_profile_is_text_listing))
$(call add_json_bool, EnforceUsesLibraries, $(LOCAL_ENFORCE_USES_LIBRARIES))
$(call add_json_str, ProvidesUsesLibrary, $(firstword $(LOCAL_PROVIDES_USES_LIBRARY) $(LOCAL_MODULE)))
$(call add_json_map, ClassLoaderContexts)
$(call add_json_class_loader_context, any, $(my_dexpreopt_libs))
$(call add_json_class_loader_context, 28, $(my_dexpreopt_libs_compat_28))