Loading java/dexpreopt_bootjars.go +4 −10 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ type bootImageConfig struct { dexPaths android.WritablePaths dir android.OutputPath symbolsDir android.OutputPath targets []android.Target images map[android.ArchType]android.OutputPath zip android.WritablePath } Loading Loading @@ -191,18 +192,11 @@ func buildBootImage(ctx android.SingletonContext, config bootImageConfig) *bootI var allFiles android.Paths if !global.DisablePreopt { targets := ctx.Config().Targets[android.Android] if ctx.Config().SecondArchIsTranslated() { targets = targets[:1] } for _, target := range targets { if target.NativeBridge == android.NativeBridgeDisabled { for _, target := range image.targets { files := buildBootImageRuleForArch(ctx, image, target.Arch.ArchType, profile, missingDeps) allFiles = append(allFiles, files.Paths()...) } } } if image.zip != nil { rule := android.NewRuleBuilder() Loading java/dexpreopt_config.go +25 −2 Original line number Diff line number Diff line Loading @@ -72,6 +72,23 @@ func systemServerClasspath(ctx android.PathContext) []string { var systemServerClasspathKey = android.NewOnceKey("systemServerClasspath") // dexpreoptTargets returns the list of targets that are relevant to dexpreopting, which excludes architectures // supported through native bridge. func dexpreoptTargets(ctx android.PathContext) []android.Target { var targets []android.Target for i, target := range ctx.Config().Targets[android.Android] { if ctx.Config().SecondArchIsTranslated() && i > 0 { break } if target.NativeBridge == android.NativeBridgeDisabled { targets = append(targets, target) } } return targets } // defaultBootImageConfig returns the bootImageConfig that will be used to dexpreopt modules. It is computed once the // first time it is called for any ctx.Config(), and returns the same slice for all future calls with the same // ctx.Config(). Loading Loading @@ -113,7 +130,9 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { images := make(map[android.ArchType]android.OutputPath) zip := dir.Join(ctx, "boot.zip") for _, target := range ctx.Config().Targets[android.Android] { targets := dexpreoptTargets(ctx) for _, target := range targets { images[target.Arch.ArchType] = dir.Join(ctx, "system/framework", target.Arch.ArchType.String()).Join(ctx, "boot.art") } Loading @@ -126,6 +145,7 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { dir: dir, symbolsDir: symbolsDir, images: images, targets: targets, zip: zip, } }).(bootImageConfig) Loading Loading @@ -168,7 +188,9 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { symbolsDir := android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_apexjars_unstripped") images := make(map[android.ArchType]android.OutputPath) for _, target := range ctx.Config().Targets[android.Android] { targets := dexpreoptTargets(ctx) for _, target := range targets { images[target.Arch.ArchType] = dir.Join(ctx, "system/framework", target.Arch.ArchType.String(), "apex.art") } Loading @@ -180,6 +202,7 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { dexPaths: bootDexPaths, dir: dir, symbolsDir: symbolsDir, targets: targets, images: images, } }).(bootImageConfig) Loading Loading
java/dexpreopt_bootjars.go +4 −10 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ type bootImageConfig struct { dexPaths android.WritablePaths dir android.OutputPath symbolsDir android.OutputPath targets []android.Target images map[android.ArchType]android.OutputPath zip android.WritablePath } Loading Loading @@ -191,18 +192,11 @@ func buildBootImage(ctx android.SingletonContext, config bootImageConfig) *bootI var allFiles android.Paths if !global.DisablePreopt { targets := ctx.Config().Targets[android.Android] if ctx.Config().SecondArchIsTranslated() { targets = targets[:1] } for _, target := range targets { if target.NativeBridge == android.NativeBridgeDisabled { for _, target := range image.targets { files := buildBootImageRuleForArch(ctx, image, target.Arch.ArchType, profile, missingDeps) allFiles = append(allFiles, files.Paths()...) } } } if image.zip != nil { rule := android.NewRuleBuilder() Loading
java/dexpreopt_config.go +25 −2 Original line number Diff line number Diff line Loading @@ -72,6 +72,23 @@ func systemServerClasspath(ctx android.PathContext) []string { var systemServerClasspathKey = android.NewOnceKey("systemServerClasspath") // dexpreoptTargets returns the list of targets that are relevant to dexpreopting, which excludes architectures // supported through native bridge. func dexpreoptTargets(ctx android.PathContext) []android.Target { var targets []android.Target for i, target := range ctx.Config().Targets[android.Android] { if ctx.Config().SecondArchIsTranslated() && i > 0 { break } if target.NativeBridge == android.NativeBridgeDisabled { targets = append(targets, target) } } return targets } // defaultBootImageConfig returns the bootImageConfig that will be used to dexpreopt modules. It is computed once the // first time it is called for any ctx.Config(), and returns the same slice for all future calls with the same // ctx.Config(). Loading Loading @@ -113,7 +130,9 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { images := make(map[android.ArchType]android.OutputPath) zip := dir.Join(ctx, "boot.zip") for _, target := range ctx.Config().Targets[android.Android] { targets := dexpreoptTargets(ctx) for _, target := range targets { images[target.Arch.ArchType] = dir.Join(ctx, "system/framework", target.Arch.ArchType.String()).Join(ctx, "boot.art") } Loading @@ -126,6 +145,7 @@ func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { dir: dir, symbolsDir: symbolsDir, images: images, targets: targets, zip: zip, } }).(bootImageConfig) Loading Loading @@ -168,7 +188,9 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { symbolsDir := android.PathForOutput(ctx, ctx.Config().DeviceName(), "dex_apexjars_unstripped") images := make(map[android.ArchType]android.OutputPath) for _, target := range ctx.Config().Targets[android.Android] { targets := dexpreoptTargets(ctx) for _, target := range targets { images[target.Arch.ArchType] = dir.Join(ctx, "system/framework", target.Arch.ArchType.String(), "apex.art") } Loading @@ -180,6 +202,7 @@ func apexBootImageConfig(ctx android.PathContext) bootImageConfig { dexPaths: bootDexPaths, dir: dir, symbolsDir: symbolsDir, targets: targets, images: images, } }).(bootImageConfig) Loading