<buttonid="sidebar-toggle"class="icon-button"type="button"title="Toggle Table of Contents"aria-label="Toggle Table of Contents"aria-controls="sidebar">
<inputtype="search"id="searchbar"name="searchbar"placeholder="Search this book ..."aria-controls="searchresults-outer"aria-describedby="searchresults-header">
<tr><tdalign="left"><aid="ninja-name"></a>name</td><tdalign="left">A unique name for this target.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels#target-names">Name</a></td><tdalign="left">required</td><tdalign="left"></td></tr>
<tr><tdalign="left"><aid="ninja-additional_inputs"></a>additional_inputs</td><tdalign="left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-additional_tools"></a>additional_tools</td><tdalign="left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-alwayslink"></a>alwayslink</td><tdalign="left">Optional. if true, link all the object files from the static library, even if they are not used.</td><tdalign="left">Boolean</td><tdalign="left">optional</td><tdalign="left"><code>False</code></td></tr>
<tr><tdalign="left"><aid="ninja-args"></a>args</td><tdalign="left">A list of arguments to pass to the call to <code>ninja</code></td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-build_data"></a>build_data</td><tdalign="left">Files needed by this rule only during build/compile time. May list file or rule targets. Generally allows any target.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-copts"></a>copts</td><tdalign="left">Optional. Add these options to the compile flags passed to the foreign build system. The flags only take affect for compiling this target, not its dependencies.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-data"></a>data</td><tdalign="left">Files needed by this rule at runtime. May list file or rule targets. Generally allows any target.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-defines"></a>defines</td><tdalign="left">Optional compilation definitions to be passed to the dependencies of this library. They are NOT passed to the compiler, you should duplicate them in the configuration options.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-deps"></a>deps</td><tdalign="left">Optional dependencies to be copied into the directory structure. Typically those directly required for the external building of the library/binaries. (i.e. those that the external build system will be looking for and paths to which are provided by the calling rule)</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-directory"></a>directory</td><tdalign="left">A directory to pass as the <code>-C</code> argument. The rule will always use the root directory of the <code>lib_sources</code> attribute if this attribute is not set</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>""</code></td></tr>
<tr><tdalign="left"><aid="ninja-env"></a>env</td><tdalign="left">Environment variables to set during the build. <code>$(execpath)</code> macros may be used to point at files which are listed as <code>data</code>, <code>deps</code>, or <code>build_data</code>, but unlike with other rules, these will be replaced with absolute paths to those files, because the build does not run in the exec root. This attribute is subject to make variable substitution. No other macros are supported.Variables containing <code>PATH</code> (e.g. <code>PATH</code>, <code>LD_LIBRARY_PATH</code>, <code>CPATH</code>) entries will be prepended to the existing variable.</td><tdalign="left"><ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a></td><tdalign="left">optional</td><tdalign="left"><code>{}</code></td></tr>
<tr><tdalign="left"><aid="ninja-includes"></a>includes</td><tdalign="left">Optional list of include dirs to be passed to the dependencies of this library. They are NOT passed to the compiler, you should duplicate them in the configuration options.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-lib_name"></a>lib_name</td><tdalign="left">Library name. Defines the name of the install directory and the name of the static library, if no output files parameters are defined (any of static_libraries, shared_libraries, interface_libraries, binaries_names) Optional. If not defined, defaults to the target's name.</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>""</code></td></tr>
<tr><tdalign="left"><aid="ninja-lib_source"></a>lib_source</td><tdalign="left">Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">Label</a></td><tdalign="left">required</td><tdalign="left"></td></tr>
<tr><tdalign="left"><aid="ninja-linkopts"></a>linkopts</td><tdalign="left">Optional link options to be passed up to the dependencies of this library</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_bin_dir"></a>out_bin_dir</td><tdalign="left">Optional name of the output subdirectory with the binary files, defaults to 'bin'.</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>"bin"</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_binaries"></a>out_binaries</td><tdalign="left">Optional names of the resulting binaries.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_data_dirs"></a>out_data_dirs</td><tdalign="left">Optional names of additional directories created by the build that should be declared as bazel action outputs</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_dll_dir"></a>out_dll_dir</td><tdalign="left">Optional name of the output subdirectory with the dll files, defaults to 'bin'.</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>"bin"</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_headers_only"></a>out_headers_only</td><tdalign="left">Flag variable to indicate that the library produces only headers</td><tdalign="left">Boolean</td><tdalign="left">optional</td><tdalign="left"><code>False</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_include_dir"></a>out_include_dir</td><tdalign="left">Optional name of the output subdirectory with the header files, defaults to 'include'.</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>"include"</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_interface_libs"></a>out_interface_libs</td><tdalign="left">Optional names of the resulting interface libraries.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_lib_dir"></a>out_lib_dir</td><tdalign="left">Optional name of the output subdirectory with the library files, defaults to 'lib'.</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>"lib"</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_shared_libs"></a>out_shared_libs</td><tdalign="left">Optional names of the resulting shared libraries.</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-out_static_libs"></a>out_static_libs</td><tdalign="left">Optional names of the resulting static libraries. Note that if <code>out_headers_only</code>, <code>out_static_libs</code>, <code>out_shared_libs</code>, and <code>out_binaries</code> are not set, default <code>lib_name.a</code>/<code>lib_name.lib</code> static library is assumed</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-postfix_script"></a>postfix_script</td><tdalign="left">Optional part of the shell script to be added after the make commands</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>""</code></td></tr>
<tr><tdalign="left"><aid="ninja-targets"></a>targets</td><tdalign="left">A list of targets with in the foreign build system to produce. An empty string (<code>""</code>) will result in a call to the underlying build system with no explicit target set</td><tdalign="left">List of strings</td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>
<tr><tdalign="left"><aid="ninja-tool_prefix"></a>tool_prefix</td><tdalign="left">A prefix for build commands</td><tdalign="left">String</td><tdalign="left">optional</td><tdalign="left"><code>""</code></td></tr>
<tr><tdalign="left"><aid="ninja-tools_deps"></a>tools_deps</td><tdalign="left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdalign="left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdalign="left">optional</td><tdalign="left"><code>[]</code></td></tr>