2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-28 08:43:51 +00:00
bazel-skylib/docs/run_binary_doc.md

2.4 KiB
Executable file

run_binary() build rule implementation.

Runs a binary as a build action. This rule does not require Bash (unlike native.genrule()).

run_binary

run_binary(name, args, env, outs, srcs, tool)

Runs a binary as a build action.

This rule does not require Bash (unlike native.genrule).

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
args Command line arguments of the binary.

Subject to $(location) expansion.
List of strings optional []
env Environment variables of the action.

Subject to $(location) expansion.
Dictionary: String -> String optional {}
outs Output files generated by the action.

These labels are available for $(location) expansion in args and env.
List of labels required
srcs Additional inputs of the action.

These labels are available for $(location) expansion in args and env.
List of labels optional []
tool The tool to run in the action.

Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for $(location) expansion in args and env.
Label required