Don't panic for unhandled product vars

Instead, we return an error. This allows us to access some product
variable information earlier when it will not be used as an attribute
without panicing

Test: m nothing
Change-Id: Id094b2b9e1364a8d174d99b3824fa149fb235b3e
This commit is contained in:
Liz Kammer
2023-09-19 08:41:14 -04:00
parent 9a97a8f62a
commit 9e2a5a7d6d
7 changed files with 36 additions and 13 deletions

View File

@@ -730,8 +730,11 @@ func (module *PrebuiltEtc) Bp2buildHelper(ctx android.TopDownMutatorContext) (*b
src.SetSelectValue(axis, config, label)
}
}
for propName, productConfigProps := range android.ProductVariableProperties(ctx, ctx.Module()) {
productVarProperties, errs := android.ProductVariableProperties(ctx, ctx.Module())
for _, err := range errs {
ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
}
for propName, productConfigProps := range productVarProperties {
for configProp, propVal := range productConfigProps {
if propName == "Src" {
props, ok := propVal.(*string)