Check whether value_variables are set
If value variable had not been set by a user, previously we would error out. Now, we just skip it. Test: go test soong tests Test: m nothing Change-Id: Ibab67e00b28055b5feee2f4fd79bf4dfb2fc6704
This commit is contained in:
parent
41351b5334
commit
40ddfaae7a
|
@ -541,12 +541,15 @@ func (s *valueVariable) initializeProperties(v reflect.Value, typ reflect.Type)
|
|||
}
|
||||
|
||||
func (s *valueVariable) PropertiesToApply(config SoongConfig, values reflect.Value) (interface{}, error) {
|
||||
if !config.IsSet(s.variable) {
|
||||
if !config.IsSet(s.variable) || !values.IsValid() {
|
||||
return nil, nil
|
||||
}
|
||||
configValue := config.String(s.variable)
|
||||
|
||||
propStruct := values.Elem().Elem()
|
||||
if !propStruct.IsValid() {
|
||||
return nil, nil
|
||||
}
|
||||
for i := 0; i < propStruct.NumField(); i++ {
|
||||
field := propStruct.Field(i)
|
||||
kind := field.Kind()
|
||||
|
|
Loading…
Reference in New Issue