summaryrefslogtreecommitdiff
path: root/android/variable.go
diff options
context:
space:
mode:
author Liz Kammer <eakammer@google.com> 2021-06-04 14:29:03 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-06-04 14:29:03 +0000
commit6044fae776c548459dc2343f6214b2b0c4916db0 (patch)
tree1926648ceb29967640f7da7dc1220fff1f2d8ea6 /android/variable.go
parentebd6253f0efc3a5a7cc225e72d474029dcc0e2b9 (diff)
parente90edc333c1ff58a88a5b57fcafd6ab50b4b93bc (diff)
Use maps in bazel *attribute types am: 9abd62d133 am: e90edc333c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1725151 Change-Id: I3d75f3405b099d21151334598a346f8c1c592e9b
Diffstat (limited to 'android/variable.go')
-rw-r--r--android/variable.go17
1 files changed, 5 insertions, 12 deletions
diff --git a/android/variable.go b/android/variable.go
index 1383daee4..c9f788c76 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -480,18 +480,11 @@ func ProductVariableProperties(ctx BaseMutatorContext) ProductConfigProperties {
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)
}
}