summaryrefslogtreecommitdiff
path: root/build/art.go
diff options
context:
space:
mode:
author Ulyana Trafimovich <skvadrik@google.com> 2019-11-08 11:27:31 +0000
committer Ulyana Trafimovich <skvadrik@google.com> 2019-11-11 10:30:10 +0000
commit7a20cbdd42fbab5ad562bf98b867c533b0a12164 (patch)
tree4b06320aa680cf43d4402a652043f40bae0a26a6 /build/art.go
parent2022debc5fc2e72b5be359e94728308ef5edf09a (diff)
Revert^4 "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit 0f7c792f12905558836cc01f3406d6ba364cefd7. Reason for revert: coverage build with EMMA_INSTRUMENT_FRAMEWORK=true is fixed by inspecting the environment variable and not generating boot image in case it is set. 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: art/build/apex/runtests.sh Bug: 144091989 Change-Id: I8378f42708a64339b0c9d70fd0d7804bc885859e
Diffstat (limited to 'build/art.go')
-rw-r--r--build/art.go14
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 {