summaryrefslogtreecommitdiff
path: root/android/variable.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/variable.go')
-rw-r--r--android/variable.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/android/variable.go b/android/variable.go
index aecad3b84..fa4cfc1fd 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -20,7 +20,6 @@ import (
"runtime"
"strings"
- "android/soong/android/soongconfig"
"android/soong/bazel"
"github.com/google/blueprint/proptools"
@@ -746,44 +745,6 @@ func (p SoongConfigProperty) SelectKey() string {
// property, like ["-DDEFINES"] for cflags.
type ProductConfigProperties map[string]map[ProductConfigOrSoongConfigProperty]interface{}
-// ProductVariableProperties returns a ProductConfigProperties containing only the properties which
-// have been set for the given module.
-func ProductVariableProperties(ctx ArchVariantContext, module Module) (ProductConfigProperties, []error) {
- var errs []error
- moduleBase := module.base()
-
- productConfigProperties := ProductConfigProperties{}
-
- if moduleBase.variableProperties != nil {
- productVariablesProperty := proptools.FieldNameForProperty("product_variables")
- if moduleBase.ArchSpecific() {
- for /* axis */ _, configToProps := range moduleBase.GetArchVariantProperties(ctx, moduleBase.variableProperties) {
- for config, props := range configToProps {
- variableValues := reflect.ValueOf(props).Elem().FieldByName(productVariablesProperty)
- productConfigProperties.AddProductConfigProperties(variableValues, config)
- }
- }
- } else {
- variableValues := reflect.ValueOf(moduleBase.variableProperties).Elem().FieldByName(productVariablesProperty)
- productConfigProperties.AddProductConfigProperties(variableValues, "")
- }
- }
-
- if m, ok := module.(Bazelable); ok && m.namespacedVariableProps() != nil {
- for namespace, namespacedVariableProps := range m.namespacedVariableProps() {
- for _, namespacedVariableProp := range namespacedVariableProps {
- variableValues := reflect.ValueOf(namespacedVariableProp).Elem().FieldByName(soongconfig.SoongConfigProperty)
- err := productConfigProperties.AddSoongConfigProperties(namespace, variableValues)
- if err != nil {
- errs = append(errs, err)
- }
- }
- }
- }
-
- return productConfigProperties, errs
-}
-
func (p *ProductConfigProperties) AddProductConfigProperty(
propertyName, productVariableName, arch string, propertyValue interface{}) {
@@ -833,10 +794,6 @@ func (p *ProductConfigProperties) AddEitherProperty(
}
}
-var (
- conditionsDefaultField string = proptools.FieldNameForProperty(bazel.ConditionsDefaultConfigKey)
-)
-
// maybeExtractConfigVarProp attempts to read this value as a config var struct
// wrapped by interfaces and ptrs. If it's not the right type, the second return
// value is false.