diff options
author | 2020-11-16 17:32:30 -0800 | |
---|---|---|
committer | 2020-12-01 16:22:16 -0800 | |
commit | f1a035e6be35d5678ce2e86bf3bc83fd5e4b4dc2 (patch) | |
tree | 097d3f1f4bf617eb5596166ee1803e3fd4b738c4 /cc/proto.go | |
parent | 33e17630944359f752cb4abcc80f79b2273645b8 (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 'cc/proto.go')
-rw-r--r-- | cc/proto.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/proto.go b/cc/proto.go index 9c102a216..44661447c 100644 --- a/cc/proto.go +++ b/cc/proto.go @@ -50,11 +50,11 @@ func genProto(ctx android.ModuleContext, protoFile android.Path, flags builderFl depFile := ccFile.ReplaceExtension(ctx, "d") outputs := android.WritablePaths{ccFile, headerFile} - rule := android.NewRuleBuilder() + rule := android.NewRuleBuilder(pctx, ctx) - android.ProtoRule(ctx, rule, protoFile, flags.proto, protoDeps, outDir, depFile, outputs) + android.ProtoRule(rule, protoFile, flags.proto, protoDeps, outDir, depFile, outputs) - rule.Build(pctx, ctx, "protoc_"+protoFile.Rel(), "protoc "+protoFile.Rel()) + rule.Build("protoc_"+protoFile.Rel(), "protoc "+protoFile.Rel()) return ccFile, headerFile } |