summaryrefslogtreecommitdiff
path: root/java/dexpreopt_bootjars.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r--java/dexpreopt_bootjars.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 4758c7e47..eb735c162 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -286,6 +286,8 @@ func buildBootImageRuleForArch(ctx android.SingletonContext, image *bootImage,
if profile != nil {
cmd.FlagWithArg("--compiler-filter=", "speed-profile")
cmd.FlagWithInput("--profile-file=", profile)
+ } else if global.PreloadedClasses.Valid() {
+ cmd.FlagWithInput("--image-classes=", global.PreloadedClasses.Path())
}
if global.DirtyImageObjects.Valid() {
@@ -372,7 +374,7 @@ Rebuild with ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" to see
func bootImageProfileRule(ctx android.SingletonContext, image *bootImage, missingDeps []string) android.WritablePath {
global := dexpreoptGlobalConfig(ctx)
- if ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() {
+ if !global.UseProfileForBootImage || ctx.Config().IsPdkBuild() || ctx.Config().UnbundledBuild() {
return nil
}
return ctx.Config().Once(bootImageProfileRuleKey, func() interface{} {