| <aid="boost_build-additional_inputs"></a>additional_inputs | Optional additional inputs to be declared as needed for the shell script action.Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="boost_build-additional_tools"></a>additional_tools | Optional additional tools needed for the building. Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="boost_build-alwayslink"></a>alwayslink | Optional. if true, link all the object files from the static library, even if they are not used. | Boolean | optional | False |
| <aid="boost_build-binaries"></a>binaries | Optional names of the resulting binaries. | List of strings | optional | [] |
| <aid="boost_build-bootstrap_options"></a>bootstrap_options | any additional flags to pass to bootstrap.sh | List of strings | optional | [] |
| <aid="boost_build-data"></a>data | Files needed by this rule at runtime. May list file or rule targets. Generally allows any target. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="boost_build-defines"></a>defines | 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. | List of strings | optional | [] |
| <aid="boost_build-deps"></a>deps | 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 buidl system will be looking for and paths to which are provided by the calling rule) | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="boost_build-env"></a>env | Environment variables to set during the build. $(execpath) macros may be used to point at files which are listed as data deps, tools_deps, or additional_tools, 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. No other macros are supported. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="boost_build-headers_only"></a>headers_only | Flag variable to indicate that the library produces only headers | Boolean | optional | False |
| <aid="boost_build-interface_libraries"></a>interface_libraries | Optional names of the resulting interface libraries. | List of strings | optional | [] |
| <aid="boost_build-lib_name"></a>lib_name | 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. | String | optional | "" |
| <aid="boost_build-lib_source"></a>lib_source | Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
| <aid="boost_build-linkopts"></a>linkopts | Optional link options to be passed up to the dependencies of this library | List of strings | optional | [] |
| <aid="boost_build-make_commands"></a>make_commands | Optinal make commands, defaults to ["make", "make install"] | List of strings | optional | ["make", "make install"] |
| <aid="boost_build-out_bin_dir"></a>out_bin_dir | Optional name of the output subdirectory with the binary files, defaults to 'bin'. | String | optional | "bin" |
| <aid="boost_build-out_include_dir"></a>out_include_dir | Optional name of the output subdirectory with the header files, defaults to 'include'. | String | optional | "include" |
| <aid="boost_build-out_lib_dir"></a>out_lib_dir | Optional name of the output subdirectory with the library files, defaults to 'lib'. | String | optional | "lib" |
| <aid="boost_build-postfix_script"></a>postfix_script | Optional part of the shell script to be added after the make commands | String | optional | "" |
| <aid="boost_build-shared_libraries"></a>shared_libraries | Optional names of the resulting shared libraries. | List of strings | optional | [] |
| <aid="boost_build-static_libraries"></a>static_libraries | Optional names of the resulting static libraries. | List of strings | optional | [] |
| <aid="boost_build-tools_deps"></a>tools_deps | Optional tools to be copied into the directory structure. Similar to deps, those directly required for the external building of the library/binaries. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="boost_build-user_options"></a>user_options | any additional flags to pass to b2 | List of strings | optional | [] |
| <aid="cmake_external-additional_inputs"></a>additional_inputs | Optional additional inputs to be declared as needed for the shell script action.Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="cmake_external-additional_tools"></a>additional_tools | Optional additional tools needed for the building. Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="cmake_external-alwayslink"></a>alwayslink | Optional. if true, link all the object files from the static library, even if they are not used. | Boolean | optional | False |
| <aid="cmake_external-binaries"></a>binaries | Optional names of the resulting binaries. | List of strings | optional | [] |
| <aid="cmake_external-cache_entries"></a>cache_entries | CMake cache entries to initialize (they will be passed with -Dkey=value) Values, defined by the toolchain, will be joined with the values, passed here. (Toolchain values come first) | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="cmake_external-cmake_options"></a>cmake_options | Other CMake options | List of strings | optional | [] |
| <aid="cmake_external-data"></a>data | Files needed by this rule at runtime. May list file or rule targets. Generally allows any target. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="cmake_external-defines"></a>defines | 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. | List of strings | optional | [] |
| <aid="cmake_external-deps"></a>deps | 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 buidl system will be looking for and paths to which are provided by the calling rule) | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="cmake_external-env"></a>env | Environment variables to set during the build. $(execpath) macros may be used to point at files which are listed as data deps, tools_deps, or additional_tools, 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. No other macros are supported. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="cmake_external-generate_crosstool_file"></a>generate_crosstool_file | When True, CMake crosstool file will be generated from the toolchain values, provided cache-entries and env_vars (some values will still be passed as -Dkey=value and environment variables). If CMAKE_TOOLCHAIN_FILE cache entry is passed, specified crosstool file will be used When using this option to cross-compile, it is required to specify CMAKE_SYSTEM_NAME in the cache_entries | Boolean | optional | True |
| <aid="cmake_external-headers_only"></a>headers_only | Flag variable to indicate that the library produces only headers | Boolean | optional | False |
| <aid="cmake_external-install_prefix"></a>install_prefix | Relative install prefix to be passed to CMake in -DCMAKE_INSTALL_PREFIX | String | optional | "" |
| <aid="cmake_external-interface_libraries"></a>interface_libraries | Optional names of the resulting interface libraries. | List of strings | optional | [] |
| <aid="cmake_external-lib_name"></a>lib_name | 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. | String | optional | "" |
| <aid="cmake_external-lib_source"></a>lib_source | Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
| <aid="cmake_external-linkopts"></a>linkopts | Optional link options to be passed up to the dependencies of this library | List of strings | optional | [] |
| <aid="cmake_external-make_commands"></a>make_commands | Optinal make commands, defaults to ["make", "make install"] | List of strings | optional | ["make", "make install"] |
| <aid="cmake_external-out_bin_dir"></a>out_bin_dir | Optional name of the output subdirectory with the binary files, defaults to 'bin'. | String | optional | "bin" |
| <aid="cmake_external-out_include_dir"></a>out_include_dir | Optional name of the output subdirectory with the header files, defaults to 'include'. | String | optional | "include" |
| <aid="cmake_external-out_lib_dir"></a>out_lib_dir | Optional name of the output subdirectory with the library files, defaults to 'lib'. | String | optional | "lib" |
| <aid="cmake_external-postfix_script"></a>postfix_script | Optional part of the shell script to be added after the make commands | String | optional | "" |
| <aid="cmake_external-shared_libraries"></a>shared_libraries | Optional names of the resulting shared libraries. | List of strings | optional | [] |
| <aid="cmake_external-static_libraries"></a>static_libraries | Optional names of the resulting static libraries. | List of strings | optional | [] |
| <aid="cmake_external-tools_deps"></a>tools_deps | Optional tools to be copied into the directory structure. Similar to deps, those directly required for the external building of the library/binaries. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="cmake_external-working_directory"></a>working_directory | Working directory, with the main CMakeLists.txt (otherwise, the top directory of the lib_source label files is used.) | String | optional | "" |
Rule for building external libraries with configure-make pattern. Some 'configure' script is invoked with --prefix=install (by default), and other parameters for compilation and linking, taken from Bazel C/C++ toolchain and passed dependencies. After configuration, GNU Make is called.
| <aid="configure_make-additional_inputs"></a>additional_inputs | Optional additional inputs to be declared as needed for the shell script action.Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="configure_make-additional_tools"></a>additional_tools | Optional additional tools needed for the building. Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="configure_make-alwayslink"></a>alwayslink | Optional. if true, link all the object files from the static library, even if they are not used. | Boolean | optional | False |
| <aid="configure_make-autoconf"></a>autoconf | Set to True if 'autoconf' should be invoked before 'configure', currently requires 'configure_in_place' to be True. | Boolean | optional | False |
| <aid="configure_make-autoconf_env_vars"></a>autoconf_env_vars | Environment variables to be set for 'autoconf' invocation. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="configure_make-autoconf_options"></a>autoconf_options | Any options to be put in the 'autoconf.sh' command line. | List of strings | optional | [] |
| <aid="configure_make-autogen"></a>autogen | Set to True if 'autogen.sh' should be invoked before 'configure', currently requires 'configure_in_place' to be True. | Boolean | optional | False |
| <aid="configure_make-autogen_command"></a>autogen_command | The name of the autogen script file, default: autogen.sh. Many projects use autogen.sh however the Autotools FAQ recommends bootstrap so we provide this option to support that. | String | optional | "autogen.sh" |
| <aid="configure_make-autogen_env_vars"></a>autogen_env_vars | Environment variables to be set for 'autogen' invocation. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="configure_make-autogen_options"></a>autogen_options | Any options to be put in the 'autogen.sh' command line. | List of strings | optional | [] |
| <aid="configure_make-autoreconf"></a>autoreconf | Set to True if 'autoreconf' should be invoked before 'configure.', currently requires 'configure_in_place' to be True. | Boolean | optional | False |
| <aid="configure_make-autoreconf_env_vars"></a>autoreconf_env_vars | Environment variables to be set for 'autoreconf' invocation. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="configure_make-autoreconf_options"></a>autoreconf_options | Any options to be put in the 'autoreconf.sh' command line. | List of strings | optional | [] |
| <aid="configure_make-binaries"></a>binaries | Optional names of the resulting binaries. | List of strings | optional | [] |
| <aid="configure_make-configure_command"></a>configure_command | The name of the configuration script file, default: configure. The file must be in the root of the source directory. | String | optional | "configure" |
| <aid="configure_make-configure_env_vars"></a>configure_env_vars | Environment variables to be set for the 'configure' invocation. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="configure_make-configure_in_place"></a>configure_in_place | Set to True if 'configure' should be invoked in place, i.e. from its enclosing directory. | Boolean | optional | False |
| <aid="configure_make-configure_options"></a>configure_options | Any options to be put on the 'configure' command line. | List of strings | optional | [] |
| <aid="configure_make-data"></a>data | Files needed by this rule at runtime. May list file or rule targets. Generally allows any target. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="configure_make-defines"></a>defines | 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. | List of strings | optional | [] |
| <aid="configure_make-deps"></a>deps | 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 buidl system will be looking for and paths to which are provided by the calling rule) | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="configure_make-env"></a>env | Environment variables to set during the build. $(execpath) macros may be used to point at files which are listed as data deps, tools_deps, or additional_tools, 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. No other macros are supported. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="configure_make-headers_only"></a>headers_only | Flag variable to indicate that the library produces only headers | Boolean | optional | False |
| <aid="configure_make-install_prefix"></a>install_prefix | Install prefix, i.e. relative path to where to install the result of the build. Passed to the 'configure' script with --prefix flag. | String | optional | "" |
| <aid="configure_make-interface_libraries"></a>interface_libraries | Optional names of the resulting interface libraries. | List of strings | optional | [] |
| <aid="configure_make-lib_name"></a>lib_name | 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. | String | optional | "" |
| <aid="configure_make-lib_source"></a>lib_source | Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
| <aid="configure_make-linkopts"></a>linkopts | Optional link options to be passed up to the dependencies of this library | List of strings | optional | [] |
| <aid="configure_make-make_commands"></a>make_commands | Optinal make commands, defaults to ["make", "make install"] | List of strings | optional | ["make", "make install"] |
| <aid="configure_make-out_bin_dir"></a>out_bin_dir | Optional name of the output subdirectory with the binary files, defaults to 'bin'. | String | optional | "bin" |
| <aid="configure_make-out_include_dir"></a>out_include_dir | Optional name of the output subdirectory with the header files, defaults to 'include'. | String | optional | "include" |
| <aid="configure_make-out_lib_dir"></a>out_lib_dir | Optional name of the output subdirectory with the library files, defaults to 'lib'. | String | optional | "lib" |
| <aid="configure_make-postfix_script"></a>postfix_script | Optional part of the shell script to be added after the make commands | String | optional | "" |
| <aid="configure_make-shared_libraries"></a>shared_libraries | Optional names of the resulting shared libraries. | List of strings | optional | [] |
| <aid="configure_make-static_libraries"></a>static_libraries | Optional names of the resulting static libraries. | List of strings | optional | [] |
| <aid="configure_make-tools_deps"></a>tools_deps | Optional tools to be copied into the directory structure. Similar to deps, those directly required for the external building of the library/binaries. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
Rule for building external libraries with GNU Make. GNU Make commands (make and make install by default) are invoked with prefix="install" (by default), and other environment variables for compilation and linking, taken from Bazel C/C++ toolchain and passed dependencies.
| <aid="make-additional_inputs"></a>additional_inputs | Optional additional inputs to be declared as needed for the shell script action.Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="make-additional_tools"></a>additional_tools | Optional additional tools needed for the building. Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="make-alwayslink"></a>alwayslink | Optional. if true, link all the object files from the static library, even if they are not used. | Boolean | optional | False |
| <aid="make-binaries"></a>binaries | Optional names of the resulting binaries. | List of strings | optional | [] |
| <aid="make-data"></a>data | Files needed by this rule at runtime. May list file or rule targets. Generally allows any target. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="make-defines"></a>defines | 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. | List of strings | optional | [] |
| <aid="make-deps"></a>deps | 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 buidl system will be looking for and paths to which are provided by the calling rule) | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="make-env"></a>env | Environment variables to set during the build. $(execpath) macros may be used to point at files which are listed as data deps, tools_deps, or additional_tools, 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. No other macros are supported. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="make-headers_only"></a>headers_only | Flag variable to indicate that the library produces only headers | Boolean | optional | False |
| <aid="make-interface_libraries"></a>interface_libraries | Optional names of the resulting interface libraries. | List of strings | optional | [] |
| <aid="make-keep_going"></a>keep_going | Keep going when some targets can not be made, -k flag is passed to make (applies only if make_commands attribute is not set). Please have a look at _create_make_script for default make_commands. | Boolean | optional | True |
| <aid="make-lib_name"></a>lib_name | 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. | String | optional | "" |
| <aid="make-lib_source"></a>lib_source | Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
| <aid="make-linkopts"></a>linkopts | Optional link options to be passed up to the dependencies of this library | List of strings | optional | [] |
| <aid="make-make_commands"></a>make_commands | Overriding make_commands default value to be empty, then we can provide better default value programmatically | List of strings | optional | [] |
| <aid="make-make_env_vars"></a>make_env_vars | Environment variables to be set for the 'configure' invocation. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="make-out_bin_dir"></a>out_bin_dir | Optional name of the output subdirectory with the binary files, defaults to 'bin'. | String | optional | "bin" |
| <aid="make-out_include_dir"></a>out_include_dir | Optional name of the output subdirectory with the header files, defaults to 'include'. | String | optional | "include" |
| <aid="make-out_lib_dir"></a>out_lib_dir | Optional name of the output subdirectory with the library files, defaults to 'lib'. | String | optional | "lib" |
| <aid="make-postfix_script"></a>postfix_script | Optional part of the shell script to be added after the make commands | String | optional | "" |
| <aid="make-prefix"></a>prefix | Install prefix, an absolute path. Passed to the GNU make via "make install PREFIX=<value>". By default, the install directory created under sandboxed execution root is used. Build results are copied to the Bazel's output directory, so the prefix is only important if it is recorded into any text files by Makefile script. In that case, it is important to note that rules_foreign_cc is overriding the paths under execution root with "BAZEL_GEN_ROOT" value. | String | optional | "" |
| <aid="make-shared_libraries"></a>shared_libraries | Optional names of the resulting shared libraries. | List of strings | optional | [] |
| <aid="make-static_libraries"></a>static_libraries | Optional names of the resulting static libraries. | List of strings | optional | [] |
| <aid="make-tools_deps"></a>tools_deps | Optional tools to be copied into the directory structure. Similar to deps, those directly required for the external building of the library/binaries. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="make_tool-make_srcs"></a>make_srcs | target with the Make sources | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
Rule for defining the toolchain data of the native tools (cmake, ninja), to be used by rules_foreign_cc with toolchain types `@rules_foreign_cc//tools/build_defs:cmake_toolchain` and `@rules_foreign_cc//tools/build_defs:ninja_toolchain`.
**ATTRIBUTES**
| Name | Description | Type | Mandatory | Default |
| <aid="native_tool_toolchain-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
| <aid="native_tool_toolchain-path"></a>path | Absolute path to the tool in case the tool is preinstalled on the machine. Relative path to the tool in case the tool is built as part of a build; the path should be relative to the bazel-genfiles, i.e. it should start with the name of the top directory of the built tree artifact. (Please see the example <code>//examples:built_cmake_toolchain</code>) | String | optional | "" |
| <aid="native_tool_toolchain-target"></a>target | If the tool is preinstalled, must be None. If the tool is built as part of the build, the corresponding build target, which should produce the tree artifact with the binary to call. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <aid="ninja-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
| <aid="ninja-additional_inputs"></a>additional_inputs | Optional additional inputs to be declared as needed for the shell script action.Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="ninja-additional_tools"></a>additional_tools | Optional additional tools needed for the building. Not used by the shell script part in cc_external_rule_impl. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="ninja-alwayslink"></a>alwayslink | Optional. if true, link all the object files from the static library, even if they are not used. | Boolean | optional | False |
| <aid="ninja-args"></a>args | A list of arguments to pass to the call to <code>ninja</code> | List of strings | optional | [] |
| <aid="ninja-binaries"></a>binaries | Optional names of the resulting binaries. | List of strings | optional | [] |
| <aid="ninja-data"></a>data | Files needed by this rule at runtime. May list file or rule targets. Generally allows any target. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="ninja-defines"></a>defines | 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. | List of strings | optional | [] |
| <aid="ninja-deps"></a>deps | 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 buidl system will be looking for and paths to which are provided by the calling rule) | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="ninja-directory"></a>directory | 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 | String | optional | "" |
| <aid="ninja-env"></a>env | Environment variables to set during the build. $(execpath) macros may be used to point at files which are listed as data deps, tools_deps, or additional_tools, 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. No other macros are supported. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
| <aid="ninja-headers_only"></a>headers_only | Flag variable to indicate that the library produces only headers | Boolean | optional | False |
| <aid="ninja-interface_libraries"></a>interface_libraries | Optional names of the resulting interface libraries. | List of strings | optional | [] |
| <aid="ninja-lib_name"></a>lib_name | 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. | String | optional | "" |
| <aid="ninja-lib_source"></a>lib_source | Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | required | |
| <aid="ninja-linkopts"></a>linkopts | Optional link options to be passed up to the dependencies of this library | List of strings | optional | [] |
| <aid="ninja-out_bin_dir"></a>out_bin_dir | Optional name of the output subdirectory with the binary files, defaults to 'bin'. | String | optional | "bin" |
| <aid="ninja-out_include_dir"></a>out_include_dir | Optional name of the output subdirectory with the header files, defaults to 'include'. | String | optional | "include" |
| <aid="ninja-out_lib_dir"></a>out_lib_dir | Optional name of the output subdirectory with the library files, defaults to 'lib'. | String | optional | "lib" |
| <aid="ninja-postfix_script"></a>postfix_script | Optional part of the shell script to be added after the make commands | String | optional | "" |
| <aid="ninja-shared_libraries"></a>shared_libraries | Optional names of the resulting shared libraries. | List of strings | optional | [] |
| <aid="ninja-static_libraries"></a>static_libraries | Optional names of the resulting static libraries. | List of strings | optional | [] |
| <aid="ninja-targets"></a>targets | A list of ninja targets to build. To call the default target, simply pass <code>""</code> as one of the items to this attribute. | List of strings | optional | [] |
| <aid="ninja-tools_deps"></a>tools_deps | Optional tools to be copied into the directory structure. Similar to deps, those directly required for the external building of the library/binaries. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional | [] |
| <aid="ConfigureParameters-attrs"></a>attrs | Attributes struct, created by create_attrs function above |
| <aid="ConfigureParameters-inputs"></a>inputs | InputFiles provider: summarized information on rule inputs, created by framework function, to be reused in script creator. Contains in particular merged compilation and linking dependencies. |
| <aid="InputFiles-headers"></a>headers | Include files built by Bazel. Will be copied into $EXT_BUILD_DEPS/include. |
| <aid="InputFiles-include_dirs"></a>include_dirs | Include directories built by Bazel. Will be copied into $EXT_BUILD_DEPS/include. |
| <aid="InputFiles-libs"></a>libs | Library files built by Bazel. Will be copied into $EXT_BUILD_DEPS/lib. |
| <aid="InputFiles-tools_files"></a>tools_files | Files and directories with tools needed for configuration/building to be copied into the bin folder, which is added to the PATH |
| <aid="InputFiles-ext_build_dirs"></a>ext_build_dirs | Directories with libraries, built by framework function. This directories should be copied into $EXT_BUILD_DEPS/lib-name as is, with all contents. |
| <aid="InputFiles-deps_compilation_info"></a>deps_compilation_info | Merged CcCompilationInfo from deps attribute |
| <aid="InputFiles-deps_linking_info"></a>deps_linking_info | Merged CcLinkingInfo from deps attribute |
| <aid="InputFiles-declared_inputs"></a>declared_inputs | All files and directories that must be declared as action inputs |
| <aid="ToolInfo-path"></a>path | Absolute path to the tool in case the tool is preinstalled on the machine. Relative path to the tool in case the tool is built as part of a build; the path should be relative to the bazel-genfiles, i.e. it should start with the name of the top directory of the built tree artifact. (Please see the example <code>//examples:built_cmake_toolchain</code>) |
| <aid="ToolInfo-target"></a>target | If the tool is preinstalled, must be None. If the tool is built as part of the build, the corresponding build target, which should produce the tree artifact with the binary to call. |
Call this function from the WORKSPACE file to initialize rules_foreign_cc dependencies and let neccesary code generation happen (Code generation is needed to support different variants of the C++ Starlark API.).
| <aid="rules_foreign_cc_dependencies-native_tools_toolchains"></a>native_tools_toolchains | pass the toolchains for toolchain types '@rules_foreign_cc//tools/build_defs:cmake_toolchain' and '@rules_foreign_cc//tools/build_defs:ninja_toolchain' with the needed platform constraints. If you do not pass anything, registered default toolchains will be selected (see below). | <code>[]</code> |
| <aid="rules_foreign_cc_dependencies-register_default_tools"></a>register_default_tools | If True, the cmake and ninja toolchains, calling corresponding preinstalled binaries by name (cmake, ninja) will be registered after 'native_tools_toolchains' without any platform constraints. The default is True. | <code>True</code> |
| <aid="rules_foreign_cc_dependencies-cmake_version"></a>cmake_version | The target version of the cmake toolchain if <code>register_default_tools</code> or <code>register_built_tools</code> is set to <code>True</code>. | <code>"3.19.6"</code> |
| <aid="rules_foreign_cc_dependencies-make_version"></a>make_version | The target version of the default make toolchain if <code>register_built_tools</code> is set to <code>True</code>. | <code>"4.3"</code> |
| <aid="rules_foreign_cc_dependencies-ninja_version"></a>ninja_version | The target version of the ninja toolchain if <code>register_default_tools</code> or <code>register_built_tools</code> is set to <code>True</code>. | <code>"1.10.2"</code> |
| <aid="rules_foreign_cc_dependencies-register_preinstalled_tools"></a>register_preinstalled_tools | If true, toolchains will be registered for the native built tools installed on the exec host | <code>True</code> |
| <aid="rules_foreign_cc_dependencies-register_built_tools"></a>register_built_tools | If true, toolchains that build the tools from source are registered | <code>True</code> |
| <aid="rules_foreign_cc_dependencies-additional_shell_toolchain_mappings"></a>additional_shell_toolchain_mappings | Mappings of the shell toolchain functions to execution and target platforms constraints. Similar to what defined in @rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains:toolchain_mappings.bzl in the TOOLCHAIN_MAPPINGS list. Please refer to example in @rules_foreign_cc//toolchain_examples. | <code>[]</code> |
| <aid="rules_foreign_cc_dependencies-additional_shell_toolchain_package"></a>additional_shell_toolchain_package | A package under which additional toolchains, referencing the generated data for the passed additonal_shell_toolchain_mappings, will be defined. This value is needed since register_toolchains() is called for these toolchains. Please refer to example in @rules_foreign_cc//toolchain_examples. | <code>None</code> |