Support building boot images with disabled dexpreopt.
Bug: 176171716 Test: build_mainline_modules.sh and ensure that the ART boot image is built: `find out -type f -name '*.art'` is nonempty for every arch. Change-Id: Ibc45581eef2b205c750a30709780cf659ba7cfa1
This commit is contained in:
@@ -347,8 +347,8 @@ func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) {
|
||||
ctx.RegisterSingletonType("dex_bootjars", dexpreoptBootJarsFactory)
|
||||
}
|
||||
|
||||
func skipDexpreoptBootJars(ctx android.PathContext) bool {
|
||||
return dexpreopt.GetGlobalConfig(ctx).DisablePreopt
|
||||
func SkipDexpreoptBootJars(ctx android.PathContext) bool {
|
||||
return dexpreopt.GetGlobalConfig(ctx).DisablePreoptBootImages
|
||||
}
|
||||
|
||||
// Singleton for generating boot image build rules.
|
||||
@@ -371,7 +371,7 @@ type dexpreoptBootJars struct {
|
||||
|
||||
// Accessor function for the apex package. Returns nil if dexpreopt is disabled.
|
||||
func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]android.OutputPaths {
|
||||
if skipDexpreoptBootJars(ctx) {
|
||||
if SkipDexpreoptBootJars(ctx) {
|
||||
return nil
|
||||
}
|
||||
// Include dexpreopt files for the primary boot image.
|
||||
@@ -387,7 +387,7 @@ func DexpreoptedArtApexJars(ctx android.BuilderContext) map[android.ArchType]and
|
||||
|
||||
// Generate build rules for boot images.
|
||||
func (d *dexpreoptBootJars) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
if skipDexpreoptBootJars(ctx) {
|
||||
if SkipDexpreoptBootJars(ctx) {
|
||||
return
|
||||
}
|
||||
if dexpreopt.GetCachedGlobalSoongConfig(ctx) == nil {
|
||||
@@ -727,7 +727,7 @@ func bootImageProfileRule(ctx android.SingletonContext, image *bootImageConfig,
|
||||
globalSoong := dexpreopt.GetCachedGlobalSoongConfig(ctx)
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
if global.DisableGenerateProfile || ctx.Config().UnbundledBuild() {
|
||||
if global.DisableGenerateProfile {
|
||||
return nil
|
||||
}
|
||||
profile := ctx.Config().Once(bootImageProfileRuleKey, func() interface{} {
|
||||
|
Reference in New Issue
Block a user