diff options
author | Mathieu Chartier <mathieuc@google.com> | 2019-04-29 09:33:50 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2019-04-30 17:01:13 -0700 |
commit | 3f7ddbba9861c04a3aa6b2b472e649f4834bd6c6 (patch) | |
tree | ba6e7738f7f59a5a3230aa3166d7d14973b2ed9d /dexpreopt | |
parent | 77b3fec7c1f59ea120465b3270fd38b633d6d921 (diff) | |
download | build_soong-3f7ddbba9861c04a3aa6b2b472e649f4834bd6c6.tar.gz build_soong-3f7ddbba9861c04a3aa6b2b472e649f4834bd6c6.tar.bz2 build_soong-3f7ddbba9861c04a3aa6b2b472e649f4834bd6c6.zip |
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 8910722e71f4d8834a6bcdf89a9d8f7822982095)
Merged-In: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
Change-Id: Ia98c4e5447b63f6362a4bd5c617a518784f0ef53
Diffstat (limited to 'dexpreopt')
-rw-r--r-- | dexpreopt/config.go | 2 | ||||
-rw-r--r-- | dexpreopt/dexpreopt.go | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/dexpreopt/config.go b/dexpreopt/config.go index f1fa0ff3..3b77042b 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -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 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) 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) @@ -301,6 +302,7 @@ func GlobalConfigForTests(ctx android.PathContext) GlobalConfig { GenerateDMFiles: false, NeverAllowStripping: false, NoDebugInfo: false, + DontResolveStartupStrings: false, AlwaysSystemServerDebugInfo: false, NeverSystemServerDebugInfo: false, AlwaysOtherDebugInfo: false, diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index 01ee15ed..5b658d98 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -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) } |