3.3 KiB
Executable File
native_binary
native_binary(name, src, out, data, kwargs)
Wraps a pre-built binary or script with a binary rule.
You can "bazel run" this rule like any other binary rule, and use it as a tool in genrule.tools for example. You can also augment the binary with runfiles.
Parameters
name |
required. |
src |
required.
label; path of the pre-built executable |
out |
required.
output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) |
data |
optional. default is None
list of labels; data dependencies |
kwargs |
optional. |
native_test
native_test(name, src, out, data, kwargs)
Wraps a pre-built binary or script with a test rule.
You can "bazel test" this rule like any other test rule. You can also augment the binary with runfiles.
Parameters
name |
required. |
src |
required.
label; path of the pre-built executable |
out |
required.
output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) |
data |
optional. default is None
list of labels; data dependencies |
kwargs |
optional. |