Use maps in bazel *attribute types
This is to simplify the process of resolving label + exclude labels
across the various configuration axes we have and across the various
properties/modules that use this behavior.
Test: ci/bp2build.sh && ci/mixed_droid.sh
Change-Id: I8efae3e75ddb365384f5caaf5bb504a5206618d3
diff --git a/android/variable.go b/android/variable.go
index 7658cdd..6d235d6 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -479,18 +479,11 @@
productVariableValues(moduleBase.variableProperties, "", &productConfigProperties)
- for arch, targetProps := range moduleBase.GetArchProperties(ctx, moduleBase.variableProperties) {
- // GetArchProperties is creating an instance of the requested type
- // and productVariablesValues expects an interface, so no need to cast
- productVariableValues(targetProps, arch.Name, &productConfigProperties)
- }
-
- for os, targetProps := range moduleBase.GetTargetProperties(ctx, moduleBase.variableProperties) {
- // GetTargetProperties is creating an instance of the requested type
- // and productVariablesValues expects an interface, so no need to cast
- productVariableValues(targetProps.Properties, os.Name, &productConfigProperties)
- for arch, archProperties := range targetProps.ArchProperties {
- productVariableValues(archProperties, os.Name+"_"+arch.Name, &productConfigProperties)
+ for _, configToProps := range moduleBase.GetArchVariantProperties(ctx, moduleBase.variableProperties) {
+ for config, props := range configToProps {
+ // GetArchVariantProperties is creating an instance of the requested type
+ // and productVariablesValues expects an interface, so no need to cast
+ productVariableValues(props, config, &productConfigProperties)
}
}