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
This commit is contained in:
@@ -157,9 +157,11 @@ func customBp2BuildMutator(ctx android.TopDownMutatorContext) {
|
||||
|
||||
paths := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, m.props.Arch_paths))
|
||||
|
||||
for arch, props := range m.GetArchProperties(ctx, &customProps{}) {
|
||||
if archProps, ok := props.(*customProps); ok && archProps.Arch_paths != nil {
|
||||
paths.SetValueForArch(arch.Name, android.BazelLabelForModuleSrc(ctx, archProps.Arch_paths))
|
||||
for axis, configToProps := range m.GetArchVariantProperties(ctx, &customProps{}) {
|
||||
for config, props := range configToProps {
|
||||
if archProps, ok := props.(*customProps); ok && archProps.Arch_paths != nil {
|
||||
paths.SetSelectValue(axis, config, android.BazelLabelForModuleSrc(ctx, archProps.Arch_paths))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user