summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-11-16 17:32:30 -0800
committerColin Cross <ccross@android.com>2020-12-01 16:22:16 -0800
commitf1a035e6be35d5678ce2e86bf3bc83fd5e4b4dc2 (patch)
tree097d3f1f4bf617eb5596166ee1803e3fd4b738c4 /filesystem/filesystem.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 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index ac33b76ae..c6181bc15 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -63,9 +63,9 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) {
f.CopyDepsToZip(ctx, zipFile)
rootDir := android.PathForModuleOut(ctx, "root").OutputPath
- builder := android.NewRuleBuilder()
+ builder := android.NewRuleBuilder(pctx, ctx)
builder.Command().
- BuiltTool(ctx, "zipsync").
+ BuiltTool("zipsync").
FlagWithArg("-d ", rootDir.String()). // zipsync wipes this. No need to clear.
Input(zipFile)
@@ -81,14 +81,14 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) {
Implicit(mkuserimg)
f.output = android.PathForModuleOut(ctx, "filesystem.img").OutputPath
- builder.Command().BuiltTool(ctx, "build_image").
+ builder.Command().BuiltTool("build_image").
Text(rootDir.String()). // input directory
Input(propFile).
Output(f.output).
Text(rootDir.String()) // directory where to find fs_config_files|dirs
// rootDir is not deleted. Might be useful for quick inspection.
- builder.Build(pctx, ctx, "build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
+ builder.Build("build_filesystem_image", fmt.Sprintf("Creating filesystem %s", f.BaseModuleName()))
f.installDir = android.PathForModuleInstall(ctx, "etc")
ctx.InstallFile(f.installDir, f.installFileName(), f.output)