aboutsummaryrefslogtreecommitdiffstats
path: root/genrule
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-05-11 13:38:59 -0700
committerColin Cross <ccross@google.com>2015-05-12 20:46:49 +0000
commitf9964d5a8d16a092c52b45674be6009d9018aa4b (patch)
tree618abdcab4d5d704a709112973e511084c64184e /genrule
parenteae04e04acc9cced9a9d73074d3f44b522b1d5f8 (diff)
downloadbuild_soong-f9964d5a8d16a092c52b45674be6009d9018aa4b.tar.gz
build_soong-f9964d5a8d16a092c52b45674be6009d9018aa4b.tar.bz2
build_soong-f9964d5a8d16a092c52b45674be6009d9018aa4b.zip
Use far dependency for genrule tool
A far dependency will not inherit any of the variations from the current module, allowing a device genrule to depend on a host tool to generate the sources. Change-Id: I7f622ddd31a81d605f55d5946a109ea53e864084
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 0f276d06..42ab047a 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -77,7 +77,8 @@ func (g *generator) GeneratedSourceFiles() []string {
func (g *generator) AndroidDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string {
if g.properties.Tool != "" {
- return []string{g.properties.Tool}
+ ctx.AddFarVariationDependencies([]blueprint.Variation{{"hostordevice", common.Host.String()}},
+ g.properties.Tool)
}
return nil
}