From 5a09829838662332171546ab685d494772b51523 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 18 Feb 2021 22:51:11 -0800 Subject: [PATCH] Updated documentation (#516) --- docs/README.md | 6 +++++- toolchains/prebuilt_toolchains.py | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7a68f892..3650d257 100644 --- a/docs/README.md +++ b/docs/README.md @@ -429,7 +429,8 @@ Structure for passing the log and scripts file information, and wrapper script t ## rules_foreign_cc_dependencies
-rules_foreign_cc_dependencies(native_tools_toolchains, register_default_tools,
+rules_foreign_cc_dependencies(native_tools_toolchains, register_default_tools, cmake_version,
+                              ninja_version, register_preinstalled_tools,
                               additional_shell_toolchain_mappings, additional_shell_toolchain_package)
 
@@ -442,6 +443,9 @@ Call this function from the WORKSPACE file to initialize rules_foreign_cc de | :------------- | :------------- | :------------- | | 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). | [] | | 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. | True | +| cmake_version | The target version of the default cmake toolchain if register_default_tools is set to True. | "3.19.5" | +| ninja_version | The target version of the default ninja toolchain if register_default_tools is set to True. | "1.10.2" | +| register_preinstalled_tools | If true, toolchains will be registered for the native built tools installed on the exec host | True | | 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. | [] | | 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. | None | diff --git a/toolchains/prebuilt_toolchains.py b/toolchains/prebuilt_toolchains.py index 5447e62d..e45238ab 100755 --- a/toolchains/prebuilt_toolchains.py +++ b/toolchains/prebuilt_toolchains.py @@ -376,8 +376,7 @@ def get_make_definitions() -> str: def main(): - """[summary] - """ + """The main entrypoint of the toolchains generator""" repos_bzl_file = Path(__file__).parent.absolute() / \ "prebuilt_toolchains.bzl"