48d7b3462d
This is helpful for analyzing how often a library is included statically on a device. If a large library is linked statically in many processes in a single device, it may be a good candidate for shared linking instead. This increases the size of module-info.json file on Cuttlefish by ~12.5% from 65MB to 72MB. Test: m Bug: 280829178 Change-Id: I3614d86d799810e1ce845e1097f43f1ec0a412a3 |
||
---|---|---|
.. | ||
tools | ||
art-host-tests.mk | ||
build_custom_images.mk | ||
catbox.mk | ||
csuite.mk | ||
cts.mk | ||
cts_root.mk | ||
device-tests.mk | ||
dex_preopt_check.mk | ||
find-shareduid-violation.mk | ||
general-tests.mk | ||
host-unit-tests.mk | ||
host_init_verifier.mk | ||
ide.mk | ||
module-info.mk | ||
mts.mk | ||
multitree.mk | ||
oem_image.mk | ||
owners.mk | ||
platform_availability_check.mk | ||
README.dex_preopt_check.md | ||
recovery_snapshot.mk | ||
sdk-addon.mk | ||
sts-lite.mk | ||
sts.mk | ||
test_mapping.mk | ||
tradefed-tests-list.mk | ||
vendor_module_check.mk | ||
vendor_snapshot.mk | ||
vndk.mk | ||
vts-core-tests.mk | ||
with-license.mk | ||
wvts.mk |
dex_preopt_check
dex_preopt_check
is a build-time check to make sure that all system server
jars are dexpreopted. When the check fails, you will see the following error
message:
FAILED:
build/make/core/tasks/dex_preopt_check.mk:13: warning: Missing compilation artifacts. Dexpreopting is not working for some system server jars
Offending entries:
Possible causes are:
-
There is an APEX/SDK mismatch. (E.g., the APEX is built from source while the SDK is built from prebuilt.)
-
The
systemserverclasspath_fragment
is not added assystemserverclasspath_fragments
of the correspondingapex
module, or not added asexported_systemserverclasspath_fragments
of the correspondingprebuilt_apex
/apex_set
module when building from prebuilt. -
The expected version of the system server java library is not preferred. (E.g., the
java_import
module hasprefer: false
when building from prebuilt.) -
Dexpreopting is disabled for the system server java library. This can be due to various reasons including but not limited to:
-
The java library has
dex_preopt: { enabled: false }
in the Android.bp file. -
The java library is listed in
DEXPREOPT_DISABLED_MODULES
in a Makefile. -
The java library is missing
installable: true
in the Android.bp file when building from source. -
Sanitizer is enabled.
-
-
PRODUCT_SYSTEM_SERVER_JARS
,PRODUCT_APEX_SYSTEM_SERVER_JARS
,PRODUCT_STANDALONE_SYSTEM_SERVER_JARS
, orPRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
has an extra entry that is not needed by the product.