Merge "Rename fields in dexpreopt config" am: 564fce4578
am: f8f3b93130
am: 517f7ba95b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699427 Change-Id: Iadeefe9966ca6b3ce5815befc6f6616c87a7c26b
This commit is contained in:
commit
8c112087cb
|
@ -132,7 +132,7 @@ type ModuleConfig struct {
|
|||
|
||||
Archs []android.ArchType
|
||||
DexPreoptImagesDeps []android.OutputPaths
|
||||
DexPreoptImageLocations []string
|
||||
DexPreoptImageLocationsOnHost []string // boot image location on host (file path without the arch subdirectory)
|
||||
|
||||
PreoptBootClassPathDexFiles android.Paths // file paths of boot class path files
|
||||
PreoptBootClassPathDexLocations []string // virtual locations of boot class path files
|
||||
|
|
|
@ -330,7 +330,7 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g
|
|||
Flag("--runtime-arg").FlagWithList("-Xbootclasspath-locations:", module.PreoptBootClassPathDexLocations, ":").
|
||||
Flag("${class_loader_context_arg}").
|
||||
Flag("${stored_class_loader_context_arg}").
|
||||
FlagWithArg("--boot-image=", strings.Join(module.DexPreoptImageLocations, ":")).Implicits(module.DexPreoptImagesDeps[archIdx].Paths()).
|
||||
FlagWithArg("--boot-image=", strings.Join(module.DexPreoptImageLocationsOnHost, ":")).Implicits(module.DexPreoptImagesDeps[archIdx].Paths()).
|
||||
FlagWithInput("--dex-file=", module.DexPath).
|
||||
FlagWithArg("--dex-location=", dexLocationArg).
|
||||
FlagWithOutput("--oat-file=", odexPath).ImplicitOutput(vdexPath).
|
||||
|
|
|
@ -48,7 +48,7 @@ func testModuleConfig(ctx android.PathContext, name, partition string) *ModuleCo
|
|||
ClassLoaderContexts: nil,
|
||||
Archs: []android.ArchType{android.Arm},
|
||||
DexPreoptImagesDeps: []android.OutputPaths{android.OutputPaths{}},
|
||||
DexPreoptImageLocations: []string{},
|
||||
DexPreoptImageLocationsOnHost: []string{},
|
||||
PreoptBootClassPathDexFiles: nil,
|
||||
PreoptBootClassPathDexLocations: nil,
|
||||
PreoptExtractedApk: false,
|
||||
|
|
|
@ -180,11 +180,11 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
|
|||
for _, target := range targets {
|
||||
archs = append(archs, target.Arch.ArchType)
|
||||
variant := bootImage.getVariant(target)
|
||||
images = append(images, variant.images)
|
||||
images = append(images, variant.imagePathOnHost)
|
||||
imagesDeps = append(imagesDeps, variant.imagesDeps)
|
||||
}
|
||||
// The image locations for all Android variants are identical.
|
||||
imageLocations := bootImage.getAnyAndroidVariant().imageLocations()
|
||||
hostImageLocations := bootImage.getAnyAndroidVariant().imageLocations()
|
||||
|
||||
var profileClassListing android.OptionalPath
|
||||
var profileBootListing android.OptionalPath
|
||||
|
@ -226,7 +226,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
|
|||
|
||||
Archs: archs,
|
||||
DexPreoptImagesDeps: imagesDeps,
|
||||
DexPreoptImageLocations: imageLocations,
|
||||
DexPreoptImageLocationsOnHost: hostImageLocations,
|
||||
|
||||
PreoptBootClassPathDexFiles: dexFiles.Paths(),
|
||||
PreoptBootClassPathDexLocations: dexLocations,
|
||||
|
|
|
@ -242,7 +242,7 @@ type bootImageConfig struct {
|
|||
symbolsDir android.OutputPath
|
||||
|
||||
// Subdirectory where the image files are installed.
|
||||
installSubdir string
|
||||
installDirOnHost string
|
||||
|
||||
// A list of (location, jar) pairs for the Java modules in this image.
|
||||
modules android.ConfiguredJarList
|
||||
|
@ -273,7 +273,7 @@ type bootImageVariant struct {
|
|||
dexLocationsDeps []string // for the dependency images and in this image
|
||||
|
||||
// Paths to image files.
|
||||
images android.OutputPath // first image file
|
||||
imagePathOnHost android.OutputPath // first image file
|
||||
imagesDeps android.OutputPaths // all files
|
||||
|
||||
// Only for extensions, paths to the primary boot images.
|
||||
|
@ -365,7 +365,7 @@ func (image *bootImageVariant) imageLocations() (imageLocations []string) {
|
|||
if image.extends != nil {
|
||||
imageLocations = image.extends.getVariant(image.target).imageLocations()
|
||||
}
|
||||
return append(imageLocations, dexpreopt.PathToLocation(image.images, image.target.Arch.ArchType))
|
||||
return append(imageLocations, dexpreopt.PathToLocation(image.imagePathOnHost, image.target.Arch.ArchType))
|
||||
}
|
||||
|
||||
func dexpreoptBootJarsFactory() android.SingletonModule {
|
||||
|
@ -604,9 +604,9 @@ func buildBootImageVariant(ctx android.SingletonContext, image *bootImageVariant
|
|||
|
||||
arch := image.target.Arch.ArchType
|
||||
os := image.target.Os.String() // We need to distinguish host-x86 and device-x86.
|
||||
symbolsDir := image.symbolsDir.Join(ctx, os, image.installSubdir, arch.String())
|
||||
symbolsDir := image.symbolsDir.Join(ctx, os, image.installDirOnHost, arch.String())
|
||||
symbolsFile := symbolsDir.Join(ctx, image.stem+".oat")
|
||||
outputDir := image.dir.Join(ctx, os, image.installSubdir, arch.String())
|
||||
outputDir := image.dir.Join(ctx, os, image.installDirOnHost, arch.String())
|
||||
outputPath := outputDir.Join(ctx, image.stem+".oat")
|
||||
oatLocation := dexpreopt.PathToLocation(outputPath, arch)
|
||||
imagePath := outputPath.ReplaceExtension(ctx, "art")
|
||||
|
@ -700,7 +700,7 @@ func buildBootImageVariant(ctx android.SingletonContext, image *bootImageVariant
|
|||
|
||||
cmd.Textf(`|| ( echo %s ; false )`, proptools.ShellEscape(failureMessage))
|
||||
|
||||
installDir := filepath.Join("/", image.installSubdir, arch.String())
|
||||
installDir := filepath.Join("/", image.installDirOnHost, arch.String())
|
||||
|
||||
var vdexInstalls android.RuleBuilderInstalls
|
||||
var unstrippedInstalls android.RuleBuilderInstalls
|
||||
|
@ -943,7 +943,7 @@ func (d *dexpreoptBootJars) MakeVars(ctx android.MakeVarsContext) {
|
|||
}
|
||||
sfx := variant.name + suffix + "_" + variant.target.Arch.ArchType.String()
|
||||
ctx.Strict("DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_"+sfx, variant.vdexInstalls.String())
|
||||
ctx.Strict("DEXPREOPT_IMAGE_"+sfx, variant.images.String())
|
||||
ctx.Strict("DEXPREOPT_IMAGE_"+sfx, variant.imagePathOnHost.String())
|
||||
ctx.Strict("DEXPREOPT_IMAGE_DEPS_"+sfx, strings.Join(variant.imagesDeps.Strings(), " "))
|
||||
ctx.Strict("DEXPREOPT_IMAGE_BUILT_INSTALLED_"+sfx, variant.installs.String())
|
||||
ctx.Strict("DEXPREOPT_IMAGE_UNSTRIPPED_BUILT_INSTALLED_"+sfx, variant.unstrippedInstalls.String())
|
||||
|
|
|
@ -83,7 +83,7 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
|||
artModules := global.ArtApexJars
|
||||
frameworkModules := global.BootJars.RemoveList(artModules)
|
||||
|
||||
artSubdir := "apex/art_boot_images/javalib"
|
||||
artDirOnHost := "apex/art_boot_images/javalib"
|
||||
frameworkSubdir := "system/framework"
|
||||
|
||||
// ART config for the primary boot image in the ART apex.
|
||||
|
@ -91,7 +91,7 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
|||
artCfg := bootImageConfig{
|
||||
name: artBootImageName,
|
||||
stem: "boot",
|
||||
installSubdir: artSubdir,
|
||||
installDirOnHost: artDirOnHost,
|
||||
modules: artModules,
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
|||
extends: &artCfg,
|
||||
name: frameworkBootImageName,
|
||||
stem: "boot",
|
||||
installSubdir: frameworkSubdir,
|
||||
installDirOnHost: frameworkSubdir,
|
||||
modules: frameworkModules,
|
||||
}
|
||||
|
||||
|
@ -129,11 +129,11 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
|||
// Create target-specific variants.
|
||||
for _, target := range targets {
|
||||
arch := target.Arch.ArchType
|
||||
imageDir := c.dir.Join(ctx, target.Os.String(), c.installSubdir, arch.String())
|
||||
imageDir := c.dir.Join(ctx, target.Os.String(), c.installDirOnHost, arch.String())
|
||||
variant := &bootImageVariant{
|
||||
bootImageConfig: c,
|
||||
target: target,
|
||||
images: imageDir.Join(ctx, imageName),
|
||||
imagePathOnHost: imageDir.Join(ctx, imageName),
|
||||
imagesDeps: c.moduleFiles(ctx, imageDir, ".art", ".oat", ".vdex"),
|
||||
dexLocations: c.modules.DevicePaths(ctx.Config(), target.Os),
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ func genBootImageConfigs(ctx android.PathContext) map[string]*bootImageConfig {
|
|||
// specific to the framework config
|
||||
frameworkCfg.dexPathsDeps = append(artCfg.dexPathsDeps, frameworkCfg.dexPathsDeps...)
|
||||
for i := range targets {
|
||||
frameworkCfg.variants[i].primaryImages = artCfg.variants[i].images
|
||||
frameworkCfg.variants[i].primaryImages = artCfg.variants[i].imagePathOnHost
|
||||
frameworkCfg.variants[i].dexLocationsDeps = append(artCfg.variants[i].dexLocations, frameworkCfg.variants[i].dexLocationsDeps...)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue