Handle soong config vars for string attrs
Previously if there was a value set outside of product variables and one inside a conditions default soong config var, we would ignore the conditions default. Now, we maintain the conditions default and use the root value in cases where there is not a value for a product variable. Test: go test soong tests Change-Id: Ic991e3aebe5bb6039353f4e3d25625e7c5190f96
This commit is contained in:
committed by
Sasha Smundak
parent
f3963f8b9c
commit
9d2d41065c
@@ -453,6 +453,14 @@ func (m *customModule) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||
}
|
||||
}
|
||||
}
|
||||
productVariableProps := android.ProductVariableProperties(ctx)
|
||||
if props, ok := productVariableProps["String_literal_prop"]; ok {
|
||||
for c, p := range props {
|
||||
if val, ok := p.(*string); ok {
|
||||
strAttr.SetSelectValue(c.ConfigurationAxis(), c.SelectKey(), val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
paths.ResolveExcludes()
|
||||
|
||||
|
Reference in New Issue
Block a user