Drop DexPreoptImages field in dexpreopt config
The field isn't used anymore. And DexPreoptImagesDeps will have the slice of which size is the same as Archs to avoid an error. Bug: 158843648 Test: m Change-Id: I520063ff7376811febbc82e1a0a43785feb5bbb2
This commit is contained in:
parent
f8645b93b4
commit
b19b58a015
|
@ -130,7 +130,6 @@ type ModuleConfig struct {
|
||||||
ClassLoaderContexts ClassLoaderContextMap
|
ClassLoaderContexts ClassLoaderContextMap
|
||||||
|
|
||||||
Archs []android.ArchType
|
Archs []android.ArchType
|
||||||
DexPreoptImages android.Paths
|
|
||||||
DexPreoptImagesDeps []android.OutputPaths
|
DexPreoptImagesDeps []android.OutputPaths
|
||||||
DexPreoptImageLocations []string
|
DexPreoptImageLocations []string
|
||||||
|
|
||||||
|
@ -275,7 +274,6 @@ type moduleJSONConfig struct {
|
||||||
EnforceUsesLibrariesStatusFile string
|
EnforceUsesLibrariesStatusFile string
|
||||||
ClassLoaderContexts jsonClassLoaderContextMap
|
ClassLoaderContexts jsonClassLoaderContextMap
|
||||||
|
|
||||||
DexPreoptImages []string
|
|
||||||
DexPreoptImagesDeps [][]string
|
DexPreoptImagesDeps [][]string
|
||||||
|
|
||||||
PreoptBootClassPathDexFiles []string
|
PreoptBootClassPathDexFiles []string
|
||||||
|
@ -301,11 +299,10 @@ func ParseModuleConfig(ctx android.PathContext, data []byte) (*ModuleConfig, err
|
||||||
config.ModuleConfig.ProfileClassListing = android.OptionalPathForPath(constructPath(ctx, config.ProfileClassListing))
|
config.ModuleConfig.ProfileClassListing = android.OptionalPathForPath(constructPath(ctx, config.ProfileClassListing))
|
||||||
config.ModuleConfig.EnforceUsesLibrariesStatusFile = constructPath(ctx, config.EnforceUsesLibrariesStatusFile)
|
config.ModuleConfig.EnforceUsesLibrariesStatusFile = constructPath(ctx, config.EnforceUsesLibrariesStatusFile)
|
||||||
config.ModuleConfig.ClassLoaderContexts = fromJsonClassLoaderContext(ctx, config.ClassLoaderContexts)
|
config.ModuleConfig.ClassLoaderContexts = fromJsonClassLoaderContext(ctx, config.ClassLoaderContexts)
|
||||||
config.ModuleConfig.DexPreoptImages = constructPaths(ctx, config.DexPreoptImages)
|
|
||||||
config.ModuleConfig.PreoptBootClassPathDexFiles = constructPaths(ctx, config.PreoptBootClassPathDexFiles)
|
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.
|
// 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
|
return config.ModuleConfig, nil
|
||||||
}
|
}
|
||||||
|
@ -327,7 +324,6 @@ func moduleConfigToJSON(config *ModuleConfig) ([]byte, error) {
|
||||||
ProfileBootListing: config.ProfileBootListing.String(),
|
ProfileBootListing: config.ProfileBootListing.String(),
|
||||||
EnforceUsesLibrariesStatusFile: config.EnforceUsesLibrariesStatusFile.String(),
|
EnforceUsesLibrariesStatusFile: config.EnforceUsesLibrariesStatusFile.String(),
|
||||||
ClassLoaderContexts: toJsonClassLoaderContext(config.ClassLoaderContexts),
|
ClassLoaderContexts: toJsonClassLoaderContext(config.ClassLoaderContexts),
|
||||||
DexPreoptImages: config.DexPreoptImages.Strings(),
|
|
||||||
DexPreoptImagesDeps: pathsListToStringLists(config.DexPreoptImagesDeps),
|
DexPreoptImagesDeps: pathsListToStringLists(config.DexPreoptImagesDeps),
|
||||||
PreoptBootClassPathDexFiles: config.PreoptBootClassPathDexFiles.Strings(),
|
PreoptBootClassPathDexFiles: config.PreoptBootClassPathDexFiles.Strings(),
|
||||||
ModuleConfig: config,
|
ModuleConfig: config,
|
||||||
|
|
|
@ -47,7 +47,6 @@ func testModuleConfig(ctx android.PathContext, name, partition string) *ModuleCo
|
||||||
EnforceUsesLibraries: false,
|
EnforceUsesLibraries: false,
|
||||||
ClassLoaderContexts: nil,
|
ClassLoaderContexts: nil,
|
||||||
Archs: []android.ArchType{android.Arm},
|
Archs: []android.ArchType{android.Arm},
|
||||||
DexPreoptImages: android.Paths{android.PathForTesting("system/framework/arm/boot.art")},
|
|
||||||
DexPreoptImagesDeps: []android.OutputPaths{android.OutputPaths{}},
|
DexPreoptImagesDeps: []android.OutputPaths{android.OutputPaths{}},
|
||||||
DexPreoptImageLocations: []string{},
|
DexPreoptImageLocations: []string{},
|
||||||
PreoptBootClassPathDexFiles: nil,
|
PreoptBootClassPathDexFiles: nil,
|
||||||
|
|
|
@ -225,7 +225,6 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
|
||||||
ClassLoaderContexts: d.classLoaderContexts,
|
ClassLoaderContexts: d.classLoaderContexts,
|
||||||
|
|
||||||
Archs: archs,
|
Archs: archs,
|
||||||
DexPreoptImages: images,
|
|
||||||
DexPreoptImagesDeps: imagesDeps,
|
DexPreoptImagesDeps: imagesDeps,
|
||||||
DexPreoptImageLocations: imageLocations,
|
DexPreoptImageLocations: imageLocations,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue