diff options
author | 2019-11-07 10:47:34 +0000 | |
---|---|---|
committer | 2019-11-07 14:20:40 +0000 | |
commit | fa2b2d35255515accd0aa69193aa5e72b009e38e (patch) | |
tree | 38438343d4560cac67bace5e5f8f52c7c517206a /build/art.go | |
parent | 2191069047034ad891ea15f60a217246edc38d53 (diff) |
Revert^2 "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit 0c63f76d90ed5b5dc4bc420fc51ffc383f8d87d9.
Reason: (some) build failures are fixed after reworking the patch.
This patch set adds precompiled dexpreopt files for the libcore part
of boot class path in the ART apex. The dexpreopt files are packaged
in javalib/$ARCH/ subdirectory and have names prefixed with 'boot'
to match the boot image on the system partition.
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 javalib/$ARCH/boot*.{art,oat,vdex} files.
Test: art/build/apex/runtests.sh
Bug: 143594594
Bug: 143593500
Change-Id: Ic09fab122f4e2acda1fa5d3c8addf1feaf9b6b8d
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 { |