summaryrefslogtreecommitdiff
path: root/java/dexpreopt_config.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-05-10 17:04:53 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2023-05-11 18:25:18 +0100
commit09d88df0407263e846b01c226184b262f2e36678 (patch)
treeca5ca5504dd326973413adaf910c44ca73c13f9e /java/dexpreopt_config.go
parentb47caccbc037b65462f757c462a99732ad6dd51c (diff)
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
Diffstat (limited to 'java/dexpreopt_config.go')
-rw-r--r--java/dexpreopt_config.go25
1 files changed, 11 insertions, 14 deletions
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index 8f732cf56..5f168e70a 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -62,8 +62,7 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig
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 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig
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 @@ func genBootImageConfigRaw(ctx android.PathContext) map[string]*bootImageConfig
}
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 @@ 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.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),
}