For enabling per product configuration of resolving startup
const strings.
Bug: 130217075
Bug: 131310042
Test: make
Change-Id: I51cb8931b915a710ab584f954b7a99c7a651d914
Test: lunch walleye_jitzygote-userdebug m && all odex file use the apex image
Bug: 119800099
(cherry picked from commit 0639b7de03)
Change-Id: Ic76f3ad6da0425479fbe660efe0a0677e60771a2
Merged-In: Ieb8f36b94264496a41998d4ceca30e1f41a98ebe
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