summaryrefslogtreecommitdiff
path: root/java/genrule.go
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2018-04-13 16:34:04 -0700
committer Makoto Onuki <omakoto@google.com> 2018-04-13 16:37:22 -0700
commit8f9ab6a26b16dacb319c746a0e07152e34cdc372 (patch)
tree1d1d252c92aaeb92d38bd01de40c6545c3a1dbde /java/genrule.go
parent02b4da53a76b4ba18e3e14588826d7af45ccd6b5 (diff)
Soong: add "java_genrule_host"
Bug: 78030154 Test: Tested with an internal test module. Change-Id: Ifaefb7cba2eb491b62fa3b398fee931ab667575f
Diffstat (limited to 'java/genrule.go')
-rw-r--r--java/genrule.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/genrule.go b/java/genrule.go
index 80b703055..8f2948240 100644
--- a/java/genrule.go
+++ b/java/genrule.go
@@ -21,6 +21,7 @@ import (
func init() {
android.RegisterModuleType("java_genrule", genRuleFactory)
+ android.RegisterModuleType("java_genrule_host", genRuleFactoryHost)
}
// java_genrule is a genrule that can depend on other java_* objects.
@@ -33,3 +34,14 @@ func genRuleFactory() android.Module {
return module
}
+
+// java_genrule_host is a genrule that can depend on other java_* objects.
+// The cmd may be run multiple times, once for each of the different host/device
+// variations.
+func genRuleFactoryHost() android.Module {
+ module := genrule.NewGenRule()
+
+ android.InitAndroidArchModule(module, android.HostSupported, android.MultilibCommon)
+
+ return module
+}