Merge "Rename UpdatableSystemServerJars to ApexSystemServerJars."
This commit is contained in:
@@ -49,10 +49,10 @@ type GlobalConfig struct {
|
|||||||
|
|
||||||
ArtApexJars android.ConfiguredJarList // modules for jars that are in the ART APEX
|
ArtApexJars android.ConfiguredJarList // modules for jars that are in the ART APEX
|
||||||
|
|
||||||
SystemServerJars android.ConfiguredJarList // jars that form the system server
|
SystemServerJars android.ConfiguredJarList // jars that form the system server
|
||||||
SystemServerApps []string // apps that are loaded into system server
|
SystemServerApps []string // apps that are loaded into system server
|
||||||
UpdatableSystemServerJars android.ConfiguredJarList // jars within apex that are loaded into system server
|
ApexSystemServerJars android.ConfiguredJarList // jars within apex that are loaded into system server
|
||||||
SpeedApps []string // apps that should be speed optimized
|
SpeedApps []string // apps that should be speed optimized
|
||||||
|
|
||||||
BrokenSuboptimalOrderOfSystemServerJars bool // if true, sub-optimal order does not cause a build error
|
BrokenSuboptimalOrderOfSystemServerJars bool // if true, sub-optimal order does not cause a build error
|
||||||
|
|
||||||
@@ -618,7 +618,7 @@ func GlobalConfigForTests(ctx android.PathContext) *GlobalConfig {
|
|||||||
ArtApexJars: android.EmptyConfiguredJarList(),
|
ArtApexJars: android.EmptyConfiguredJarList(),
|
||||||
SystemServerJars: android.EmptyConfiguredJarList(),
|
SystemServerJars: android.EmptyConfiguredJarList(),
|
||||||
SystemServerApps: nil,
|
SystemServerApps: nil,
|
||||||
UpdatableSystemServerJars: android.EmptyConfiguredJarList(),
|
ApexSystemServerJars: android.EmptyConfiguredJarList(),
|
||||||
SpeedApps: nil,
|
SpeedApps: nil,
|
||||||
PreoptFlags: nil,
|
PreoptFlags: nil,
|
||||||
DefaultCompilerFilter: "",
|
DefaultCompilerFilter: "",
|
||||||
|
@@ -111,7 +111,7 @@ func dexpreoptDisabled(ctx android.PathContext, global *GlobalConfig, module *Mo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't preopt system server jars that are updatable.
|
// Don't preopt system server jars that are updatable.
|
||||||
if global.UpdatableSystemServerJars.ContainsJar(module.Name) {
|
if global.ApexSystemServerJars.ContainsJar(module.Name) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g
|
|||||||
|
|
||||||
invocationPath := odexPath.ReplaceExtension(ctx, "invocation")
|
invocationPath := odexPath.ReplaceExtension(ctx, "invocation")
|
||||||
|
|
||||||
systemServerJars := NonUpdatableSystemServerJars(ctx, global)
|
systemServerJars := NonApexSystemServerJars(ctx, global)
|
||||||
|
|
||||||
rule.Command().FlagWithArg("mkdir -p ", filepath.Dir(odexPath.String()))
|
rule.Command().FlagWithArg("mkdir -p ", filepath.Dir(odexPath.String()))
|
||||||
rule.Command().FlagWithOutput("rm -f ", odexPath)
|
rule.Command().FlagWithOutput("rm -f ", odexPath)
|
||||||
@@ -523,13 +523,13 @@ func makefileMatch(pattern, s string) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nonUpdatableSystemServerJarsKey = android.NewOnceKey("nonUpdatableSystemServerJars")
|
var nonApexSystemServerJarsKey = android.NewOnceKey("nonApexSystemServerJars")
|
||||||
|
|
||||||
// TODO: eliminate the superficial global config parameter by moving global config definition
|
// TODO: eliminate the superficial global config parameter by moving global config definition
|
||||||
// from java subpackage to dexpreopt.
|
// from java subpackage to dexpreopt.
|
||||||
func NonUpdatableSystemServerJars(ctx android.PathContext, global *GlobalConfig) []string {
|
func NonApexSystemServerJars(ctx android.PathContext, global *GlobalConfig) []string {
|
||||||
return ctx.Config().Once(nonUpdatableSystemServerJarsKey, func() interface{} {
|
return ctx.Config().Once(nonApexSystemServerJarsKey, func() interface{} {
|
||||||
return android.RemoveListFromList(global.SystemServerJars.CopyOfJars(), global.UpdatableSystemServerJars.CopyOfJars())
|
return android.RemoveListFromList(global.SystemServerJars.CopyOfJars(), global.ApexSystemServerJars.CopyOfJars())
|
||||||
}).([]string)
|
}).([]string)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ func checkSystemServerOrder(ctx android.PathContext, jarIndex int) {
|
|||||||
mctx, isModule := ctx.(android.ModuleContext)
|
mctx, isModule := ctx.(android.ModuleContext)
|
||||||
if isModule {
|
if isModule {
|
||||||
config := GetGlobalConfig(ctx)
|
config := GetGlobalConfig(ctx)
|
||||||
jars := NonUpdatableSystemServerJars(ctx, config)
|
jars := NonApexSystemServerJars(ctx, config)
|
||||||
mctx.WalkDeps(func(dep android.Module, parent android.Module) bool {
|
mctx.WalkDeps(func(dep android.Module, parent android.Module) bool {
|
||||||
depIndex := android.IndexList(dep.Name(), jars)
|
depIndex := android.IndexList(dep.Name(), jars)
|
||||||
if jarIndex < depIndex && !config.BrokenSuboptimalOrderOfSystemServerJars {
|
if jarIndex < depIndex && !config.BrokenSuboptimalOrderOfSystemServerJars {
|
||||||
|
@@ -107,7 +107,7 @@ func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext)
|
|||||||
global := dexpreopt.GetGlobalConfig(ctx)
|
global := dexpreopt.GetGlobalConfig(ctx)
|
||||||
|
|
||||||
possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Contents, systemServerClasspathFragmentContentDepTag)
|
possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Contents, systemServerClasspathFragmentContentDepTag)
|
||||||
return global.UpdatableSystemServerJars.Filter(possibleUpdatableModules)
|
return global.ApexSystemServerJars.Filter(possibleUpdatableModules)
|
||||||
}
|
}
|
||||||
|
|
||||||
type systemServerClasspathFragmentContentDependencyTag struct {
|
type systemServerClasspathFragmentContentDependencyTag struct {
|
||||||
|
Reference in New Issue
Block a user