Pass other boot classpath locations to the apex image.

am: feef2ef4d7

Change-Id: I669b4e6ba2aef3cafd6392f4904dd940f54ee4a6
This commit is contained in:
Nicolas Geoffray
2019-04-30 06:46:19 -07:00
committed by android-build-merger

View File

@@ -138,21 +138,29 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
global := dexpreoptGlobalConfig(ctx) global := dexpreoptGlobalConfig(ctx)
runtimeModules := global.RuntimeApexJars runtimeModules := global.RuntimeApexJars
nonFrameworkModules := concat(runtimeModules, global.ProductUpdatableBootModules)
frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
imageModules := concat(runtimeModules, frameworkModules)
var runtimeBootLocations []string var bootLocations []string
for _, m := range runtimeModules { for _, m := range runtimeModules {
runtimeBootLocations = append(runtimeBootLocations, bootLocations = append(bootLocations,
filepath.Join("/apex/com.android.runtime/javalib", m+".jar")) filepath.Join("/apex/com.android.runtime/javalib", m+".jar"))
} }
for _, m := range frameworkModules {
bootLocations = append(bootLocations,
filepath.Join("/system/framework", m+".jar"))
}
// The path to bootclasspath dex files needs to be known at module GenerateAndroidBuildAction time, before // The path to bootclasspath dex files needs to be known at module GenerateAndroidBuildAction time, before
// the bootclasspath modules have been compiled. Set up known paths for them, the singleton rules will copy // the bootclasspath modules have been compiled. Set up known paths for them, the singleton rules will copy
// them there. // them there.
// TODO: use module dependencies instead // TODO: use module dependencies instead
var runtimeBootDexPaths android.WritablePaths var bootDexPaths android.WritablePaths
for _, m := range runtimeModules { for _, m := range imageModules {
runtimeBootDexPaths = append(runtimeBootDexPaths, bootDexPaths = append(bootDexPaths,
android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_apexjars_input", m+".jar")) android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_apexjars_input", m+".jar"))
} }
@@ -167,9 +175,9 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig {
return bootImageConfig{ return bootImageConfig{
name: "apex", name: "apex",
modules: runtimeModules, modules: imageModules,
dexLocations: runtimeBootLocations, dexLocations: bootLocations,
dexPaths: runtimeBootDexPaths, dexPaths: bootDexPaths,
dir: dir, dir: dir,
symbolsDir: symbolsDir, symbolsDir: symbolsDir,
images: images, images: images,