|
| 1 | +<html devsite> |
| 2 | +<head> |
| 3 | + <meta name="project_path" value="/_project.yaml"> |
| 4 | + <meta name="book_path" value="/_book.yaml"> |
| 5 | +</head> |
| 6 | +<body> |
| 7 | + |
| 8 | +<h1 class="page-title">Command-Line Reference</h1> |
| 9 | + |
| 10 | +{% dynamic setvar source_file "site/command-line-reference-prefix.html" %} |
| 11 | +{% include "_buttons.html" %} |
| 12 | + |
| 13 | +<pre> |
| 14 | +bazel [<startup options>] <command> [<args>] |
| 15 | +</pre> |
| 16 | + |
| 17 | +or |
| 18 | + |
| 19 | +<pre> |
| 20 | +bazel [<startup options>] <command> [<args>] -- [<target patterns>] |
| 21 | +</pre> |
| 22 | + |
| 23 | +See the <a href="/docs/build#specifying-build-targets">User's Guide</a> for the |
| 24 | +target patterns syntax. |
| 25 | + |
| 26 | +<h2>Option Syntax</h2> |
| 27 | + |
| 28 | +<p> |
| 29 | +Options can be passed to Bazel in different ways. Options that require a value |
| 30 | +can be passed with either an equals sign or a space: |
| 31 | +<pre> |
| 32 | +--<option>=<value> |
| 33 | +--<option> <value> |
| 34 | +</pre> |
| 35 | +Some options have a single character short form; in that case, the short form |
| 36 | +has to be passed with a single dash and a space. |
| 37 | +<pre> |
| 38 | +-<short_form> <value> |
| 39 | +</pre> |
| 40 | +</p> |
| 41 | + |
| 42 | +<p> |
| 43 | +Boolean options can be enabled as follows: |
| 44 | +<pre> |
| 45 | +--<option> |
| 46 | +--<option>=[true|yes|1] |
| 47 | +</pre> |
| 48 | + |
| 49 | +and disabled as follows: |
| 50 | +<pre> |
| 51 | +--no<option> |
| 52 | +--<option>=[false|no|0] |
| 53 | +</pre> |
| 54 | +</p> |
| 55 | + |
| 56 | +<p> |
| 57 | +Tristate options are usually set to automatic by default, and can be |
| 58 | +force-enabled as follows: |
| 59 | +<pre> |
| 60 | +--<option>=[true|yes|1] |
| 61 | +</pre> |
| 62 | +or force-disabled as follows: |
| 63 | +<pre> |
| 64 | +--no<option> |
| 65 | +--<option>=[false|no|0] |
| 66 | +</pre> |
| 67 | +</p> |
0 commit comments