Merge "Enable app image startup cache for preopted apps"

This commit is contained in:
Mathieu Chartier
2019-05-01 20:29:20 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ type GlobalConfig struct {
NeverAllowStripping bool // whether stripping should not be done - used as build time check to make sure dex files are always available NeverAllowStripping bool // whether stripping should not be done - used as build time check to make sure dex files are always available
NoDebugInfo bool // don't generate debug info by default NoDebugInfo bool // don't generate debug info by default
DontResolveStartupStrings bool // don't resolve string literals loaded during application startup.
AlwaysSystemServerDebugInfo bool // always generate mini debug info for system server modules (overrides NoDebugInfo=true) AlwaysSystemServerDebugInfo bool // always generate mini debug info for system server modules (overrides NoDebugInfo=true)
NeverSystemServerDebugInfo bool // never generate mini debug info for system server modules (overrides NoDebugInfo=false) NeverSystemServerDebugInfo bool // never generate mini debug info for system server modules (overrides NoDebugInfo=false)
AlwaysOtherDebugInfo bool // always generate mini debug info for non-system server modules (overrides NoDebugInfo=true) AlwaysOtherDebugInfo bool // always generate mini debug info for non-system server modules (overrides NoDebugInfo=true)
@@ -301,6 +302,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig {
GenerateDMFiles: false, GenerateDMFiles: false,
NeverAllowStripping: false, NeverAllowStripping: false,
NoDebugInfo: false, NoDebugInfo: false,
DontResolveStartupStrings: false,
AlwaysSystemServerDebugInfo: false, AlwaysSystemServerDebugInfo: false,
NeverSystemServerDebugInfo: false, NeverSystemServerDebugInfo: false,
AlwaysOtherDebugInfo: false, AlwaysOtherDebugInfo: false,

View File

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