Merge "Pass --preloaded-classes to boot image compilation."
This commit is contained in:
@@ -284,6 +284,9 @@ type bootImageConfig struct {
|
||||
|
||||
// Target-dependent fields.
|
||||
variants []*bootImageVariant
|
||||
|
||||
// Path of the preloaded classes file.
|
||||
preloadedClassesFile string
|
||||
}
|
||||
|
||||
// Target-dependent description of a boot image.
|
||||
@@ -686,6 +689,13 @@ func buildBootImageVariant(ctx android.ModuleContext, image *bootImageVariant, p
|
||||
cmd.FlagWithArg("--base=", ctx.Config().LibartImgDeviceBaseAddress())
|
||||
}
|
||||
|
||||
// We always expect a preloaded classes file to be available. However, if we cannot find it, it's
|
||||
// OK to not pass the flag to dex2oat.
|
||||
preloadedClassesPath := android.ExistentPathForSource(ctx, image.preloadedClassesFile)
|
||||
if preloadedClassesPath.Valid() {
|
||||
cmd.FlagWithInput("--preloaded-classes=", preloadedClassesPath.Path())
|
||||
}
|
||||
|
||||
cmd.
|
||||
FlagForEachInput("--dex-file=", image.dexPaths.Paths()).
|
||||
FlagForEachArg("--dex-location=", image.dexLocations).
|
||||
|
Reference in New Issue
Block a user