Ensure data is passed to all generation actions
Test: go test genrule tests
Test: build/soong/tests/genrule_sandbox_test.py \
framework-cppstream-protos framework-javastream-protos
Change-Id: I16fa939280c7ff0f230a0a8cf18af5e55f16eb03
diff --git a/genrule/genrule.go b/genrule/genrule.go
index b29e2c9..99c9166 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -435,6 +435,7 @@
cmd = g.CmdModifier(ctx, cmd)
}
+ var extraInputs android.Paths
// Generate tasks, either from genrule or gensrcs.
for i, task := range g.taskGenerator(ctx, cmd, srcFiles) {
if len(task.out) == 0 {
@@ -442,7 +443,6 @@
return
}
- var extraInputs android.Paths
// Only handle extra inputs once as these currently are the same across all tasks
if i == 0 {
for name, values := range task.extraInputs {