diff options
author | 2019-10-24 17:26:18 +0100 | |
---|---|---|
committer | 2019-10-30 10:13:29 +0000 | |
commit | bd30285e436f33b65f92b167cd48ecc1d36c7b54 (patch) | |
tree | 6600698d4f1bfcbbca8052b7c77aa04935ee3956 /build/art.go | |
parent | ab7bea2abdd13622b30cd742dde73b2b741f0173 (diff) |
Package dexpreopt artifacts for libcore jars in the ART apex.
This patchset removes the obsolete preinstall hook that was used to
run dex2oat to dexpreopt bootclasspath jars when installing the apex
on device.
Instead, this patchset adds precompiled dexpreopt files for the
libcore part of bootclasspath in the apex. See the related patch in
build/soong.
The dexpreopt files are packaged in dexpreopt/$ARCH/ subdirectory
and have names prefixed with 'boot-art'.
Test: m
Test: m com.android.art deapexer \
&& find $ANDROID_BUILD_TOP -type f -name 'com.android.art.*.apex \
| xargs deapexer | grep boot \
Expect to find dexpreopt/$ARCH/boot-art*.{art,oat,vdex} files.
Test: art/build/apex/runtests.sh
Change-Id: I52a9a4d726d0da5a1cc52644351275cd3bb0f0d3
Diffstat (limited to 'build/art.go')
-rw-r--r-- | build/art.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/build/art.go b/build/art.go index 56eec54138..4c1099bc98 100644 --- a/build/art.go +++ b/build/art.go @@ -312,6 +312,10 @@ func init() { android.RegisterModuleType("art_global_defaults", artGlobalDefaultsFactory) android.RegisterModuleType("art_debug_defaults", artDebugDefaultsFactory) + // ART apex is special because it must include dexpreopt files for bootclasspath jars. + android.RegisterModuleType("art_apex", artApexBundleFactory) + android.RegisterModuleType("art_apex_test", artTestApexBundleFactory) + // TODO: This makes the module disable itself for host if HOST_PREFER_32_BIT is // set. We need this because the multilib types of binaries listed in the apex // rule must match the declared type. This is normally not difficult but HOST_PREFER_32_BIT @@ -321,8 +325,16 @@ func init() { android.RegisterModuleType("art_apex_test_host", artHostTestApexBundleFactory) } +func artApexBundleFactory() android.Module { + return apex.ApexBundleFactory(false /*testApex*/, true /*artApex*/) +} + +func artTestApexBundleFactory() android.Module { + return apex.ApexBundleFactory(true /*testApex*/, true /*artApex*/) +} + func artHostTestApexBundleFactory() android.Module { - module := apex.ApexBundleFactory( /*testApex*/ true) + module := apex.ApexBundleFactory(true /*testApex*/, true /*artApex*/) android.AddLoadHook(module, func(ctx android.LoadHookContext) { if envTrue(ctx, "HOST_PREFER_32_BIT") { type props struct { |