Make GetTargetProperties() aware of more complex targets, like 'android_arm', instead of just 'android'.

Test: Added new unit test and updated existing tests.

Test: bazel build //bionic/... //external/... //frameworks/... //system/...

Test: ./build/bazel/scripts/run_presubmits.sh

Change-Id: I250d1964f5cf42b92ddb929379d35d8c844423f7
This commit is contained in:
Rupert Shuttleworth
2021-05-19 06:49:02 -04:00
parent 26caa1b2de
commit c194ffbcf3
7 changed files with 534 additions and 162 deletions

View File

@@ -488,7 +488,10 @@ func ProductVariableProperties(ctx BaseMutatorContext) 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, os.Name, &productConfigProperties)
productVariableValues(targetProps.Properties, os.Name, &productConfigProperties)
for arch, archProperties := range targetProps.ArchProperties {
productVariableValues(archProperties, os.Name+"_"+arch.Name, &productConfigProperties)
}
}
return productConfigProperties