Unify installDirOnHost and installDirOnDevice.
These two fields never do what they are described to do. This CL unifies
them to avoid the confusion.
Bug: 280440941
Test: m
Change-Id: I3652d73a50832a2e494d9f5cae750f5fc38293b4
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index 8f732cf..5f168e7 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -62,8 +62,7 @@
artCfg := bootImageConfig{
name: artBootImageName,
stem: bootImageStem,
- installDirOnHost: "apex/art_boot_images/javalib",
- installDirOnDevice: frameworkSubdir,
+ installDir: "apex/art_boot_images/javalib",
profileInstallPathInApex: "etc/boot-image.prof",
modules: artModules,
preloadedClassesFile: "art/build/boot/preloaded-classes",
@@ -77,8 +76,7 @@
extends: &artCfg,
name: frameworkBootImageName,
stem: bootImageStem,
- installDirOnHost: frameworkSubdir,
- installDirOnDevice: frameworkSubdir,
+ installDir: frameworkSubdir,
modules: frameworkModules,
preloadedClassesFile: "frameworks/base/config/preloaded-classes",
compilerFilter: "speed-profile",
@@ -86,14 +84,13 @@
}
mainlineCfg := bootImageConfig{
- extends: &frameworkCfg,
- name: mainlineBootImageName,
- stem: bootImageStem,
- installDirOnHost: frameworkSubdir,
- installDirOnDevice: frameworkSubdir,
- modules: mainlineBcpModules,
- compilerFilter: "verify",
- singleImage: true,
+ extends: &frameworkCfg,
+ name: mainlineBootImageName,
+ stem: bootImageStem,
+ installDir: frameworkSubdir,
+ modules: mainlineBcpModules,
+ compilerFilter: "verify",
+ singleImage: true,
}
return map[string]*bootImageConfig{
@@ -132,12 +129,12 @@
// Create target-specific variants.
for _, target := range targets {
arch := target.Arch.ArchType
- imageDir := c.dir.Join(ctx, target.Os.String(), c.installDirOnHost, arch.String())
+ imageDir := c.dir.Join(ctx, target.Os.String(), c.installDir, arch.String())
variant := &bootImageVariant{
bootImageConfig: c,
target: target,
imagePathOnHost: imageDir.Join(ctx, imageName),
- imagePathOnDevice: filepath.Join("/", c.installDirOnDevice, arch.String(), imageName),
+ imagePathOnDevice: filepath.Join("/", c.installDir, arch.String(), imageName),
imagesDeps: c.moduleFiles(ctx, imageDir, ".art", ".oat", ".vdex"),
dexLocations: c.modules.DevicePaths(ctx.Config(), target.Os),
}