Add bp2build converter for cc_genrule.
Test: cc_genrule_conversion_test.go
Change-Id: I19290b417d6336020a15ba7fa772ee0c76c58225
diff --git a/cc/genrule.go b/cc/genrule.go
index 0ca901e..9df5228 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -21,7 +21,7 @@
)
func init() {
- android.RegisterModuleType("cc_genrule", genRuleFactory)
+ android.RegisterModuleType("cc_genrule", GenRuleFactory)
}
type GenruleExtraProperties struct {
@@ -37,7 +37,7 @@
// cc_genrule is a genrule that can depend on other cc_* objects.
// The cmd may be run multiple times, once for each of the different arch/etc
// variations.
-func genRuleFactory() android.Module {
+func GenRuleFactory() android.Module {
module := genrule.NewGenRule()
extra := &GenruleExtraProperties{}
@@ -48,6 +48,7 @@
android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibBoth)
android.InitApexModule(module)
+ android.InitBazelModule(module)
return module
}