Merge "Drop DexPreoptImages field in dexpreopt config"

This commit is contained in:
Treehugger Robot 2021-04-27 01:53:45 +00:00 committed by Gerrit Code Review
commit bdae1e5765
3 changed files with 1 additions and 7 deletions

View File

@ -131,7 +131,6 @@ type ModuleConfig struct {
ClassLoaderContexts ClassLoaderContextMap
Archs []android.ArchType
DexPreoptImages android.Paths
DexPreoptImagesDeps []android.OutputPaths
DexPreoptImageLocations []string
@ -276,7 +275,6 @@ type moduleJSONConfig struct {
EnforceUsesLibrariesStatusFile string
ClassLoaderContexts jsonClassLoaderContextMap
DexPreoptImages []string
DexPreoptImagesDeps [][]string
PreoptBootClassPathDexFiles []string
@ -302,11 +300,10 @@ func ParseModuleConfig(ctx android.PathContext, data []byte) (*ModuleConfig, err
config.ModuleConfig.ProfileClassListing = android.OptionalPathForPath(constructPath(ctx, config.ProfileClassListing))
config.ModuleConfig.EnforceUsesLibrariesStatusFile = constructPath(ctx, config.EnforceUsesLibrariesStatusFile)
config.ModuleConfig.ClassLoaderContexts = fromJsonClassLoaderContext(ctx, config.ClassLoaderContexts)
config.ModuleConfig.DexPreoptImages = constructPaths(ctx, config.DexPreoptImages)
config.ModuleConfig.PreoptBootClassPathDexFiles = constructPaths(ctx, config.PreoptBootClassPathDexFiles)
// This needs to exist, but dependencies are already handled in Make, so we don't need to pass them through JSON.
config.ModuleConfig.DexPreoptImagesDeps = make([]android.OutputPaths, len(config.ModuleConfig.DexPreoptImages))
config.ModuleConfig.DexPreoptImagesDeps = make([]android.OutputPaths, len(config.ModuleConfig.Archs))
return config.ModuleConfig, nil
}
@ -328,7 +325,6 @@ func moduleConfigToJSON(config *ModuleConfig) ([]byte, error) {
ProfileBootListing: config.ProfileBootListing.String(),
EnforceUsesLibrariesStatusFile: config.EnforceUsesLibrariesStatusFile.String(),
ClassLoaderContexts: toJsonClassLoaderContext(config.ClassLoaderContexts),
DexPreoptImages: config.DexPreoptImages.Strings(),
DexPreoptImagesDeps: pathsListToStringLists(config.DexPreoptImagesDeps),
PreoptBootClassPathDexFiles: config.PreoptBootClassPathDexFiles.Strings(),
ModuleConfig: config,

View File

@ -47,7 +47,6 @@ func testModuleConfig(ctx android.PathContext, name, partition string) *ModuleCo
EnforceUsesLibraries: false,
ClassLoaderContexts: nil,
Archs: []android.ArchType{android.Arm},
DexPreoptImages: android.Paths{android.PathForTesting("system/framework/arm/boot.art")},
DexPreoptImagesDeps: []android.OutputPaths{android.OutputPaths{}},
DexPreoptImageLocations: []string{},
PreoptBootClassPathDexFiles: nil,

View File

@ -225,7 +225,6 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
ClassLoaderContexts: d.classLoaderContexts,
Archs: archs,
DexPreoptImages: images,
DexPreoptImagesDeps: imagesDeps,
DexPreoptImageLocations: imageLocations,