summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/android/module.go b/android/module.go
index 68d9f8e75..c099e6d15 100644
--- a/android/module.go
+++ b/android/module.go
@@ -915,9 +915,16 @@ type commonProperties struct {
type CommonAttributes struct {
// Soong nameProperties -> Bazel name
Name string
+
// Data mapped from: Required
Data bazel.LabelListAttribute
+ // SkipData is neither a Soong nor Bazel target attribute
+ // If true, this will not fill the data attribute automatically
+ // This is useful for Soong modules that have 1:many Bazel targets
+ // Some of the generated Bazel targets might not have a data attribute
+ SkipData *bool
+
Tags bazel.StringListAttribute
Applicable_licenses bazel.LabelListAttribute
@@ -1305,7 +1312,12 @@ func (attrs *CommonAttributes) fillCommonBp2BuildModuleAttrs(ctx *topDownMutator
platformEnabledAttribute.Add(&l)
}
- attrs.Data.Append(required)
+ if !proptools.Bool(attrs.SkipData) {
+ attrs.Data.Append(required)
+ }
+ // SkipData is not an attribute of any Bazel target
+ // Set this to nil so that it does not appear in the generated build file
+ attrs.SkipData = nil
moduleEnableConstraints := bazel.LabelListAttribute{}
moduleEnableConstraints.Append(platformEnabledAttribute)