• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<a name="#run_binary"></a>
2## run_binary
3
4<pre>
5run_binary(<a href="#run_binary-name">name</a>, <a href="#run_binary-args">args</a>, <a href="#run_binary-env">env</a>, <a href="#run_binary-outs">outs</a>, <a href="#run_binary-srcs">srcs</a>, <a href="#run_binary-tool">tool</a>)
6</pre>
7
8Runs a binary as a build action.<br/><br/>This rule does not require Bash (unlike <code>native.genrule</code>).
9
10### Attributes
11
12<table class="params-table">
13  <colgroup>
14    <col class="col-param" />
15    <col class="col-description" />
16  </colgroup>
17  <tbody>
18    <tr id="run_binary-name">
19      <td><code>name</code></td>
20      <td>
21        <a href="https://bazel.build/docs/build-ref.html#name">Name</a>; required
22        <p>
23          A unique name for this target.
24        </p>
25      </td>
26    </tr>
27    <tr id="run_binary-args">
28      <td><code>args</code></td>
29      <td>
30        List of strings; optional
31        <p>
32          Command line arguments of the binary.<br/><br/>Subject to<code><a href="https://docs.bazel.build/versions/master/be/make-variables.html#location">$(location)</a></code> expansion.
33        </p>
34      </td>
35    </tr>
36    <tr id="run_binary-env">
37      <td><code>env</code></td>
38      <td>
39        <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a>; optional
40        <p>
41          Environment variables of the action.<br/><br/>Subject to  <code><a href="https://docs.bazel.build/versions/master/be/make-variables.html#location">$(location)</a></code> expansion.
42        </p>
43      </td>
44    </tr>
45    <tr id="run_binary-outs">
46      <td><code>outs</code></td>
47      <td>
48        List of labels; required
49        <p>
50          Output files generated by the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
51        </p>
52      </td>
53    </tr>
54    <tr id="run_binary-srcs">
55      <td><code>srcs</code></td>
56      <td>
57        <a href="https://bazel.build/docs/build-ref.html#labels">List of labels</a>; optional
58        <p>
59          Additional inputs of the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
60        </p>
61      </td>
62    </tr>
63    <tr id="run_binary-tool">
64      <td><code>tool</code></td>
65      <td>
66        <a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; required
67        <p>
68          The tool to run in the action.<br/><br/>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 <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.
69        </p>
70      </td>
71    </tr>
72  </tbody>
73</table>
74
75
76