summaryrefslogtreecommitdiff
path: root/sdk/update.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-11-16 17:32:30 -0800
committer Colin Cross <ccross@android.com> 2020-12-01 16:22:16 -0800
commitf1a035e6be35d5678ce2e86bf3bc83fd5e4b4dc2 (patch)
tree097d3f1f4bf617eb5596166ee1803e3fd4b738c4 /sdk/update.go
parent33e17630944359f752cb4abcc80f79b2273645b8 (diff)
Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access the BuilderContext by passing it to NewRuleBuilder instead of RuleBuilder.Build. Test: genrule_test.go Test: rule_builder_test.go Test: m checkbuild Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
Diffstat (limited to 'sdk/update.go')
-rw-r--r--sdk/update.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sdk/update.go b/sdk/update.go
index ba63542a4..377aaae76 100644
--- a/sdk/update.go
+++ b/sdk/update.go
@@ -92,7 +92,7 @@ func (gc *generatedContents) Printfln(format string, args ...interface{}) {
}
func (gf *generatedFile) build(pctx android.PackageContext, ctx android.BuilderContext, implicits android.Paths) {
- rb := android.NewRuleBuilder()
+ rb := android.NewRuleBuilder(pctx, ctx)
content := gf.content.String()
@@ -108,7 +108,7 @@ func (gf *generatedFile) build(pctx android.PackageContext, ctx android.BuilderC
Text("| sed 's/\\\\n/\\n/g' >").Output(gf.path)
rb.Command().
Text("chmod a+x").Output(gf.path)
- rb.Build(pctx, ctx, gf.path.Base(), "Build "+gf.path.Base())
+ rb.Build(gf.path.Base(), "Build "+gf.path.Base())
}
// Collect all the members.