Add RuleBuilder helper functions for built and prebuilt tools
Replace the common pattern of: cmd.Tool(ctx.Config().HostToolPath(ctx, "tool")) with: cmd.BuiltTool("tool") And similarly for PrebuiltBuildTool. Test: m checkbuild Change-Id: I7d63188505362c7df6a3b3e7330b4a2cca5a2409
This commit is contained in:
@@ -34,7 +34,7 @@ func genProto(ctx android.ModuleContext, protoFile android.Path, flags android.P
|
||||
// Proto generated python files have an unknown package name in the path, so package the entire output directory
|
||||
// into a srcszip.
|
||||
zipCmd := rule.Command().
|
||||
Tool(ctx.Config().HostToolPath(ctx, "soong_zip")).
|
||||
BuiltTool(ctx, "soong_zip").
|
||||
FlagWithOutput("-o ", srcsZipFile)
|
||||
if pkgPath != "" {
|
||||
zipCmd.FlagWithArg("-P ", pkgPath)
|
||||
|
Reference in New Issue
Block a user