Move bazel_module property to a common file, and add it to filegroup.
This enables prototyping against aosp/1441774 to demonstrate mixed
builds with converted BUILD files.
Test: TH Presubmit
Test: USE_BAZEL_ANALYSIS=1 m libc && prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-aosp_cf_x86_auto.ninja -t commands libc | grep bazel-out | wc -l # 2 build actions
Bug: 171263886
Change-Id: I7b5cd0449d043ba26a339a0ef98b562fc62e13c8
diff --git a/genrule/genrule.go b/genrule/genrule.go
index f85146c..0743e67 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -26,6 +26,7 @@
"github.com/google/blueprint/proptools"
"android/soong/android"
+ "android/soong/bazel"
)
func init() {
@@ -78,13 +79,6 @@
blueprint.BaseDependencyTag
label string
}
-
-// TODO(cparsons): Move to a common location when there is more than just
-// genrule with a bazel_module property.
-type bazelModuleProperties struct {
- Label string
-}
-
type generatorProperties struct {
// The command to run on one or more input files. Cmd supports substitution of a few variables
//
@@ -118,8 +112,8 @@
// input files to exclude
Exclude_srcs []string `android:"path,arch_variant"`
- // in bazel-enabled mode, the bazel label to evaluate instead of this module
- Bazel_module bazelModuleProperties
+ // Properties for Bazel migration purposes.
+ bazel.Properties
}
type Module struct {
android.ModuleBase