Runs a binary as a build action. This rule does not require Bash (unlike native.genrule()). This fork of bazel-skylib's run_binary adds directory output support and better makevar expansions. ## run_binary
run_binary(name, tool, srcs, args, env, outs, out_dirs, output_dir, kwargs)Runs a binary as a build action. This rule does not require Bash (unlike `native.genrule`). **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | The target name | none | | tool | The tool to run in the action.
$(location)
expansion in args
and env
. | none |
| srcs | Additional inputs of the action.$(location)
expansion in args
and env
. | []
|
| args | Command line arguments of the binary.$(location)
and makevar expansions. | []
|
| env | Environment variables of the action.$(location)
and makevar expansions. | {}
|
| outs | Output files generated by the action.$(location)
expansion in args
and env
.[]
|
| out_dirs | Output directories generated by the action.$(location)
expansion in args
and env
sincew they are not pre-declared labels created via attr.output_list(). Output directories are declared instead by ctx.actions.declare_directory
.[]
|
| output_dir | If set to True then an output directory named the same as the target name is added to out_dirs.False
|
| kwargs | Additional arguments | none |