Commit graph

29 commits

Author SHA1 Message Date
Mathieu Chartier
b37c79c3a2 Add PRODUCT_DEX_PREOPT_RESOLVE_STARTUP_STRINGS
For enabling per product configuration of resolving startup
const strings.

Bug: 130217075
Bug: 131310042
Test: make
Change-Id: I51cb8931b915a710ab584f954b7a99c7a651d914
2019-04-29 11:23:26 -07:00
Nicolas Geoffray
0f25cbf342 Pass DEXPREOPT_USE_APEX_IMAGE to soong.
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
2019-04-05 13:59:04 +01:00
Anton Hansson
74dc00b88f Move WITH_DEXPREOPT default value
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
2019-02-27 15:03:23 +00:00
Nicolas Geoffray
269bc741a5 Support for install multiple boot images.
Bug: 119800099
Test: m && /system/framework/arm/apex*.art files exist
Change-Id: I78023f1086446c2c44ff6b282993537b053c0588
2019-02-22 15:33:23 +00:00
Colin Cross
36b5d1cd47 Update calls to dexpreopt_gen
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
2019-02-20 21:46:15 -08:00
Colin Cross
862ab81669 Revert "Update calls to dexpreopt_gen"
This reverts commit 1d8df4a97f.

Reason for revert: broke ndk build

Change-Id: I99ab62653fc15b985edd42301ec085ba68389f51
2019-02-21 05:03:11 +00:00
Colin Cross
1d8df4a97f Update calls to dexpreopt_gen
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
2019-02-20 11:14:14 -08:00
Nicolas Geoffray
f026d899f4 Set a dedicated variable for the runtime apex libs.
Bug: 124789867
Test: build with coverage, the boot classpath has jacoco.jar in /system/framework, not the apex
Change-Id: I2529f8fcb4ef30454a9e5fc95d58d31bef83ec6f
2019-02-20 10:05:17 +00:00
Colin Cross
47e384c3d6 Remove dexpreopting of boot jars from Make
Dexpreopting of boot jars is now implemented in
build/soong/java/dexpreopt_bootjars.go.

Test: m checkbuild
Change-Id: I036510e7674b876976ce191c5b18bf0b7a15c6ee
2019-02-15 13:00:14 -08:00
Nicolas Geoffray
cd75414f1e Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" 2019-02-13 11:59:39 +00:00
Nicolas Geoffray
98f5e86660 Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
This reverts commit a81dad1bc4.

Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Change-Id: Ie3c43830fc9a994ed35883abb8ca71d97bd5c44d
2019-02-12 14:00:38 +00:00
Colin Cross
87378f1888 Move dexpreopt image selection out of dexpreopt_gen
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
2019-02-11 15:25:07 -08:00
Colin Cross
05ef66fc0b Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system."" 2019-02-11 19:31:31 +00:00
Colin Cross
a81dad1bc4 Revert "Never strip and store dex files uncompressed when they are preopted on system."
This reverts commit 9cdc3beb3d.

Reason for revert: b/123436620

Change-Id: I45fa9236e37c3b7e2d44ede62a2701db2bc8a20d
2019-02-11 19:30:39 +00:00
Nicolas Geoffray
f07d63390c Merge "Never strip and store dex files uncompressed when they are preopted on system." 2019-02-11 10:31:12 +00:00
Nicolas Geoffray
9cdc3beb3d Never strip and store dex files uncompressed when they are preopted on system.
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
2019-02-08 22:45:48 +00:00
Colin Cross
33f245a209 Add DEXPREOPT_BOOTCLASSPATH_DEX_FILES to DEXPREOPT_GEN_DEPS
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
2019-02-07 22:29:55 +00:00
Nicolas Geoffray
14c052ec9b Revert "Revert "Differentiate between runtime apex jars and framework jars.""
This reverts commit 12746221c2.

Reason for revert: Sailfish size issues resolved.

Change-Id: I59e3ebf67d89f25d84d65cbfbe2a69ba1d8c30a3
2019-01-25 09:40:21 +00:00
Nicolas Geoffray
12746221c2 Revert "Differentiate between runtime apex jars and framework jars."
This reverts commit 6bcc93983b.

Reason for revert: Sailfish running out of space.

Change-Id: I2a82aa27bb4388a3cdb94f9271c712644064bfad
2019-01-24 20:37:37 +00:00
Nicolas Geoffray
6bcc93983b Differentiate between runtime apex jars and framework jars.
And use the apex paths of runtime apex jars.

Test: m
Change-Id: I7bd6e6029c2d5d596d672545271b5ed9819090b6
2019-01-24 13:10:22 +00:00
Nicolas Geoffray
f084e7847e Pass the right dex files to dex preopt.
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
2019-01-23 16:07:02 +00:00
Dongwon Kang
167758a153 Move UPDATABLE_BOOT_(MODULES|JARS) to base_system.mk for further extension
Test: build & boot
Bug: 112766913

Change-Id: I5af02d44c4b4163acdc4e3078dcebd84556ee049
2019-01-18 17:06:18 -08:00
Colin Cross
ded0aec988 Separate dexpreopt deps from stripping deps
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
2019-01-17 16:41:36 -08:00
Nicolas Geoffray
6ce12f56de dex_preopt: differentiate between updatable boot jars and non-updatable boot jars.
bug: 119868597
Test: m
Change-Id: I2f12ed6f37b629effc30e7b0c3310dc32e5ff4c8
2019-01-17 14:35:41 +00:00
Vladimir Marko
e3a2db8661 Remove conscrypt from boot image.
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
2019-01-11 10:27:17 +00:00
Vladimir Marko
3266d6ef22 Preopt: Pass -Xbootclasspath: arg to dex2oat.
Test: Pixel 2 XL boots.
Bug: 119868597
Change-Id: I951c0953ad336b6a3af441da396fe7705258623c
2018-12-21 15:52:24 +00:00
Colin Cross
6db5b0ea9a Move dexpreopting to Soong
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
2018-12-17 13:46:17 -08:00
Colin Cross
b8901d7fb8 Revert "Move dexpreopting to Soong"
This reverts commit e736c58043.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
e736c58043 Move dexpreopting to Soong
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
2018-12-12 17:21:22 -08:00