product_variables srcs in prebuilt_etc
bp2build conversion handles product_variable srcs bug: 228353067 Test: prebuilt_etc_conversion_test.go Change-Id: I82d3a384ee14d4e981d502dd9eb824c87d5ae2c7
This commit is contained in:
@@ -31,6 +31,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
@@ -692,6 +693,22 @@ func (module *PrebuiltEtc) ConvertWithBp2build(ctx android.TopDownMutatorContext
|
||||
src.SetSelectValue(axis, config, label)
|
||||
}
|
||||
}
|
||||
|
||||
for propName, productConfigProps := range android.ProductVariableProperties(ctx) {
|
||||
for configProp, propVal := range productConfigProps {
|
||||
if propName == "Src" {
|
||||
props, ok := propVal.(*string)
|
||||
if !ok {
|
||||
ctx.PropertyErrorf(" Expected Property to have type string, but was %s\n", reflect.TypeOf(propVal).String())
|
||||
continue
|
||||
}
|
||||
if props != nil {
|
||||
label := android.BazelLabelForModuleSrcSingle(ctx, *props)
|
||||
src.SetSelectValue(configProp.ConfigurationAxis(), configProp.SelectKey(), label)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var filename string
|
||||
|
Reference in New Issue
Block a user