Add a build-time check for dexpreopting system server jars.
Bug: 201371822 Test: m nothing Test: manual - 1. Add "service-permission" to DEXPREOPT_DISABLED_MODULES (https://cs.android.com/android/platform/superproject/+/master:build/make/core/product_config.mk?q=DEXPREOPT_DISABLED_MODULES) 2. m nothing 3. See the error: Missing compilation artifacts. Dexpreopting is not working for some system server jars Offending entries: system/framework/oat/x86_64/apex@com.android.permission@javalib@service-permission.jar@classes.odex system/framework/oat/x86_64/apex@com.android.permission@javalib@service-permission.jar@classes.vdex Change-Id: If29b1c367e22e302f76bfbae29588e69536414b7
This commit is contained in:
18
core/tasks/dex_preopt_check.mk
Normal file
18
core/tasks/dex_preopt_check.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
# Checks that some critical dexpreopt output files are installed.
|
||||
|
||||
# Inputs:
|
||||
# DISABLE_DEXPREOPT_CHECK: True if the check should be disabled.
|
||||
# PRODUCT_PACKAGES: The list of packages to be installed for the product.
|
||||
# ALL_DEFAULT_INSTALLED_MODULES: The full list of modules going to be installed.
|
||||
# DEXPREOPT_SYSTEMSERVER_ARTIFACTS: The list of compilation artifacts of system server jars, which
|
||||
# is generated by Soong in dexpreopt_check.go.
|
||||
|
||||
ifneq (true,$(DISABLE_DEXPREOPT_CHECK))
|
||||
# Skip the check if the system server is not installed for the product.
|
||||
ifneq (,$(filter services,$(PRODUCT_PACKAGES)))
|
||||
$(call maybe-print-list-and-error,\
|
||||
$(filter-out $(ALL_DEFAULT_INSTALLED_MODULES),$(DEXPREOPT_SYSTEMSERVER_ARTIFACTS)),\
|
||||
Missing compilation artifacts. Dexpreopting is not working for some system server jars \
|
||||
)
|
||||
endif
|
||||
endif
|
Reference in New Issue
Block a user