Revert "Remove option to create boot image based on preloaded classes"

This reverts commit 4a0473175e.

Reason for revert: NDK build broken

Change-Id: Id98bf9d5f82ed72d8c489264cf9d754e8ea1d27e
This commit is contained in:
Mathieu Chartier
2019-06-26 16:44:38 +00:00
parent 4a0473175e
commit d3f688b521
3 changed files with 14 additions and 7 deletions

View File

@@ -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{} {