They are now created from Soong, and therefore put in a separate config file
out/soong/dexpreopt_soong.config.
Test: m
Bug: 145934348
Change-Id: I27e710f09c37e64e8975b8e763d13434e5de71b3
Migrate PRODUCT_UPDATABLE_BOOT_MODULES &
PRODUCT_UPDATABLE_BOOT_LOCATIONS to a new PRODUCT_UPDATABLE_BOOT_JARS.
This new variable uses the same format as
PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS, i.e <apex>:<jar> pair.
Test: Compiles & flashed device. Ensured that the bootclasspath & system_server class
paths remain the same.
Change-Id: I1cb26d5ec825cd1f5282a6e0255094ddf2fe046a
Allow system_server jars delivered via apex. Regular system_server
jars are located in /system/framework folder. But, jars delivered via
apex are mounted at /apex/<module_name>/javalib. Also, not all the
libraries in /apex/<module_name>/javalib will be a system_server jar,
so adding a mechanism to list out the jar file explicitly within the
apex module.
Bug: 144722612
Bug: 141785760
Test: Compiles (both with empty & non-empty PRODUCT_SYSTEM_SERVER_APEX_JARS
value set)
Change-Id: Ia181ab22fdf2da575bfd532c1cd90a2f54742528
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.
On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:
lunch qemu_trusty_arm64-userdebug && m nothing \
&& fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).
This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.
Test: lunch aosp_walleye-userdebug && m \
&& find $ANDROID_BUILD_TOP/out -name 'boot.art'
# expect to find files in /out/target/product/walleye/system/framework/$ARCH/
Test: lunch qemu_trusty_arm64-userdebug && m \
&& fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
# expect empty output
Change-Id: I3d765ed0dd8b38236b8bdd5c6202bb1d3f45f904
Stripping is incompatible with ART module updatability.
Bug: 65154345
Bug: 138851227
Test: build and observe no change in output (stripping is not used by
default).
Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
dexpreopt usually gets a dex jar instead of the final APK, which
means targetSdkVersion can't be parsed out of it. Move the
shared library verification to a tool that operates on the final
AndroidManifest.xml instead. verify_uses_libraries.sh is still
used to verify prebuilts where we don't have an AndroidManifest.xml
and must parse it out of the APK.
Test: m Gallery2
Bug: 132357300
Change-Id: I6ade74b6144c73aee094f5d5ff343067ca0a0e5a
Move the dexpreopt.config passed to Soong to out/soong/dexpreopt.config
and let it write a new copy in a rule and pass the path back to make
as DEX_PREOPT_CONFIG_FOR_MAKE.
Bug: 132379813
Test: m checkbuild
Change-Id: Iac29beac3af8864d36d1563ce42bed11b685548d
For enabling per product configuration of resolving startup
const strings.
Bug: 130217075
Bug: 131310042
Test: make
(cherry picked from commit b37c79c3a2)
Merged-In: I51cb8931b915a710ab584f954b7a99c7a651d914
Change-Id: I0ecc7823620bca9f252b3d91b82982db91dd248d
This allows setting the variable READONLY after reading the BoardConfig.
This is safe to do because this flag is only set in BoardConfig.mk
files. The same is not true for many of the other default preopt flags,
like DEX_PREOPT_DEFAULT or WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
which are set in mixture of product / board config files.
Test: boot blueline
Change-Id: I961ba581f9790bcdc7cf6b36d8b53bcdb8861a92
dexpreopt_gen now requires a -out_dir argument, and does not need
DexPath, StripInputPath and StripOutputPath set.
Also use paths to Soong binaries for dex2oat, profman and aapt
so that they can be loaded as Path objects in Soong, and let
Soong handle the default for BootImageProfiles.
This reapplies I97b1865fd98d5108d9c63ff7a90a5591c7622526 with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.
Test: m checkbuild
Change-Id: I5af9b749235823b7e1cfcfc55e121bfec413fb2f
dexpreopt_gen now requires a -out_dir argument, and does not need
DexPath, StripInputPath and StripOutputPath set.
Also use paths to Soong binaries for dex2oat, profman and aapt
so that they can be loaded as Path objects in Soong, and let
Soong handle the default for BootImageProfiles.
Test: m checkbuild
Change-Id: I97b1865fd98d5108d9c63ff7a90a5591c7622526
Bug: 124789867
Test: build with coverage, the boot classpath has jacoco.jar in /system/framework, not the apex
Change-Id: I2529f8fcb4ef30454a9e5fc95d58d31bef83ec6f
Dexpreopting of boot jars is now implemented in
build/soong/java/dexpreopt_bootjars.go.
Test: m checkbuild
Change-Id: I036510e7674b876976ce191c5b18bf0b7a15c6ee
Instead of passing both the module and global dexpreopt image
selection into dexpreopt_gen, determine the correct dexpreopt
image in Make. This allows the Make dexpreopt rule to only
depend on the necessary boot images, preventing an order-only
dependency on the 32-bit boot image for a 64-bit only module.
Also stop using the boot image "location" as an input, only
track the real path, which will be converted to the "location"
that dex2oat expects when constructing the command line in
dexpreopt_gen.
Removes support for the unused LOCAL_DEX_PREOPT_IMAGE_LOCATION
variable.
Test: m checkbuild
Change-Id: I2e3e1d30fdfed92fb08e6cc1c9515edf8d99c7f0
In order for the runtime module to always be able to compile apps,
make sure we keep a copy of the dex files optimally.
Gated by a product flag if a product doesn't include the module yet.
Test: build
Change-Id: Ia9bba7f6f12f3400078a43d39ba4134cf8818399
Anything that might be used by dexpreopt.sh needs to be listed
in DEXPREOPT_GEN_DEPS to make sure it is up to date if
dexpreopt.sh has never run before and generated its .d file.
Bug: 124062553
Test: lunch aosp_blueline-userdebug
m out/target/product/blueline/obj/APPS/Gallery2_intermediates/dexpreopt.zip
lunch aosp_sailfish-userdebug
m out/target/product/sailfish/obj/APPS/Gallery2_intermediates/dexpreopt.zip
Change-Id: I2608f68d1a2157f9c95bd136eb82010aceed1c59
We currently pass the boot dex files installed on /system, but these
may be eg stripped. That's currently OK as dex2oat is looking
at the dex files in boot.oat, but dex2oat could look at them for
various reasons.
Test: m
Change-Id: I85915c979cf94ec29751b10a0d8a5957b6cea956
The strip rule does not need to wait for the boot image to finish,
create a separate DEXPREOPT_STRIP_DEPS list that only contains
tools used by GenerateStripRule in build/soong/dexpreopt/dexpreopt.go.
Bug: 123038675
Test: m checkbuild
Change-Id: I0814c8d99781533f5778e14547d3e9671e06317f
But keep it as part of the boot class path and deliver the
dex files uncompressed in /system/framework/conscrypt.jar.
Test: Pixel 2 XL boots.
Bug: 119868597
Change-Id: I41b96a586401d120998be5a111331935030922c6
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502