Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8910722e authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

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
Change-Id: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
parent 363360c9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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,
+3 −0
Original line number Diff line number Diff line
@@ -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)
	}