Enable app image startup cache for preopted apps

To get performance benefits here for apps that aren't installed
through the play store.

Bug: 130217075
Bug: 131310042
Test: make

(cherry picked from commit 8910722e71)

Merged-In: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
Change-Id: Ia98c4e5447b63f6362a4bd5c617a518784f0ef53
This commit is contained in:
Mathieu Chartier
2019-04-29 09:33:50 -07:00
parent 77b3fec7c1
commit 3f7ddbba98
2 changed files with 5 additions and 0 deletions

View File

@@ -461,6 +461,9 @@ func dexpreoptCommand(ctx android.PathContext, global GlobalConfig, module Modul
appImageInstallPath := pathtools.ReplaceExtension(odexInstallPath, "art")
cmd.FlagWithOutput("--app-image-file=", appImagePath).
FlagWithArg("--image-format=", "lz4")
if !global.DontResolveStartupStrings {
cmd.FlagWithArg("--resolve-startup-const-strings=", "true")
}
rule.Install(appImagePath, appImageInstallPath)
}