Add 'use_debug_art' to product_variable

Add 'use_debug_art' property to product_variable so it can be checked
from Android.bp whether ART debug APEX or ART APEX should be used.

Bug: 351698657
Test: AOSP CF eng build succeeded
Test: AOSP CF userdebug build succeeded
Change-Id: I01cd80f0d899c55828ecb05fdafdc9bb05fd8200
This commit is contained in:
Kiyoung Kim 2024-07-08 11:02:23 +09:00 committed by Bartłomiej Rudecki
parent f2ef1a3447
commit fb75ec2011
Signed by: przekichane
GPG key ID: 751F23C6F014EF76
3 changed files with 13 additions and 0 deletions

View file

@ -2097,3 +2097,11 @@ func (c *config) BoardUseVbmetaDigestInFingerprint() bool {
func (c *config) OemProperties() []string {
return c.productVariables.OemProperties
}
func (c *config) UseDebugArt() bool {
if c.productVariables.ArtTargetIncludeDebugBuild != nil {
return Bool(c.productVariables.ArtTargetIncludeDebugBuild)
}
return Bool(c.productVariables.Eng)
}

View file

@ -2194,6 +2194,9 @@ func (e configurationEvalutor) EvaluateConfiguration(condition proptools.Configu
switch variable {
case "debuggable":
return proptools.ConfigurableValueBool(ctx.Config().Debuggable())
case "use_debug_art":
// TODO(b/234351700): Remove once ART does not have separated debug APEX
return proptools.ConfigurableValueBool(ctx.Config().UseDebugArt())
default:
// TODO(b/323382414): Might add these on a case-by-case basis
ctx.OtherModulePropertyErrorf(m, property, fmt.Sprintf("TODO(b/323382414): Product variable %q is not yet supported in selects", variable))

View file

@ -530,6 +530,8 @@ type ProductVariables struct {
BoardUseVbmetaDigestInFingerprint *bool `json:",omitempty"`
OemProperties []string `json:",omitempty"`
ArtTargetIncludeDebugBuild *bool `json:",omitempty"`
}
type PartitionQualifiedVariablesType struct {