Control mutator order
Register mutators inside lambdas that are called in a defined order to
correctly order mutators before and after the arch and deps mutators.
Test: build.ninja identical
Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
diff --git a/genrule/genrule.go b/genrule/genrule.go
index baa6b33..f70c5fc 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -25,8 +25,6 @@
func init() {
android.RegisterModuleType("gensrcs", GenSrcsFactory)
android.RegisterModuleType("genrule", GenRuleFactory)
-
- android.RegisterBottomUpMutator("genrule_deps", genruleDepsMutator).Parallel()
}
var (
@@ -95,7 +93,7 @@
return g.genPath
}
-func genruleDepsMutator(ctx android.BottomUpMutatorContext) {
+func (g *generator) DepsMutator(ctx android.BottomUpMutatorContext) {
if g, ok := ctx.Module().(*generator); ok {
if g.properties.Tool != "" {
ctx.AddFarVariationDependencies([]blueprint.Variation{