forked from openkylin/platform_build
manifest_check.py: translate library names using dexpreopt configs.
Java modules that are defined in makefiles are not processed in topological order, so it is necessary to communicate information from dependencies via dexpreopt.config files. This has already been done in make/core/dex_preopt_config_merger.py, and now manifest_check.py also needs to get library names from their dexpreopt.config files. This is to accommodate Java libraries which name differs from their modules name. Soong properties `uses_libs`/`optional_uses_libs` and makefile vars `LOCAL_USES_LIBRARIES`/`LOCAL_OPTIONAL_USES_LIBRARIES` contain module names, not library names, so it is necessary to translate them when comparing against library names in the manifest. Bug: 132357300 Test: lunch cf_x86_64_phone-userdebug && m Change-Id: I769b508a927d87a5ffbabf9aa45eebfb954b8bd2
This commit is contained in:
parent
2bf587713b
commit
928fc2c1ef
|
@ -220,12 +220,16 @@ ifeq (true,$(LOCAL_ENFORCE_USES_LIBRARIES))
|
|||
$(LOCAL_OPTIONAL_USES_LIBRARIES))
|
||||
my_relax_check_arg := $(if $(filter true,$(RELAX_USES_LIBRARY_CHECK)), \
|
||||
--enforce-uses-libraries-relax,)
|
||||
my_dexpreopt_config_args := $(patsubst %,--dexpreopt-config %,$(my_dexpreopt_dep_configs))
|
||||
|
||||
my_enforced_uses_libraries := $(intermediates.COMMON)/enforce_uses_libraries.status
|
||||
$(my_enforced_uses_libraries): PRIVATE_USES_LIBRARIES := $(my_uses_libs_args)
|
||||
$(my_enforced_uses_libraries): PRIVATE_OPTIONAL_USES_LIBRARIES := $(my_optional_uses_libs_args)
|
||||
$(my_enforced_uses_libraries): PRIVATE_DEXPREOPT_CONFIGS := $(my_dexpreopt_config_args)
|
||||
$(my_enforced_uses_libraries): PRIVATE_RELAX_CHECK := $(my_relax_check_arg)
|
||||
$(my_enforced_uses_libraries): $(AAPT)
|
||||
$(my_enforced_uses_libraries): $(my_verify_script)
|
||||
$(my_enforced_uses_libraries): $(my_dexpreopt_dep_configs)
|
||||
$(my_enforced_uses_libraries): $(my_manifest_or_apk)
|
||||
@echo Verifying uses-libraries: $<
|
||||
rm -f $@
|
||||
|
@ -235,6 +239,7 @@ ifeq (true,$(LOCAL_ENFORCE_USES_LIBRARIES))
|
|||
--aapt $(AAPT) \
|
||||
$(PRIVATE_USES_LIBRARIES) \
|
||||
$(PRIVATE_OPTIONAL_USES_LIBRARIES) \
|
||||
$(PRIVATE_DEXPREOPT_CONFIGS) \
|
||||
$(PRIVATE_RELAX_CHECK) \
|
||||
$<
|
||||
$(built_module) : $(my_enforced_uses_libraries)
|
||||
|
|
Loading…
Reference in New Issue