From b6938f84a28962d1a9f170cd311b387ed96d5b90 Mon Sep 17 00:00:00 2001 From: James Sharpe Date: Fri, 12 Jan 2024 22:28:37 +0000 Subject: [PATCH] Allow configuring meson, make and pkgconfig versions via bzlmod extension --- MODULE.bazel | 23 +- examples/MODULE.bazel | 15 +- .../third_party/zlib/zlib_repositories.bzl | 1 + foreign_cc/extensions.bzl | 126 +- foreign_cc/meson.bzl | 4 +- foreign_cc/private/bzlmod/BUILD.bazel | 0 foreign_cc/private/bzlmod/toolchain_hub.bzl | 33 + foreign_cc/repositories.bzl | 28 +- toolchains/BUILD.bazel | 30 - toolchains/built_toolchains.bzl | 234 +++- toolchains/cmake_versions.bzl | 20 +- toolchains/prebuilt_toolchains.bzl | 1134 ++--------------- toolchains/prebuilt_toolchains.py | 64 +- toolchains/private/BUILD.bazel | 99 +- 14 files changed, 502 insertions(+), 1309 deletions(-) create mode 100644 foreign_cc/private/bzlmod/BUILD.bazel create mode 100644 foreign_cc/private/bzlmod/toolchain_hub.bzl diff --git a/MODULE.bazel b/MODULE.bazel index a18a292c..012b0261 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,8 +7,8 @@ module( ) bazel_dep(name = "bazel_features", version = "1.15.0") -bazel_dep(name = "bazel_skylib", version = "1.3.0") -bazel_dep(name = "platforms", version = "0.0.5") +bazel_dep(name = "bazel_skylib", version = "1.6.1") +bazel_dep(name = "platforms", version = "0.0.9") bazel_dep(name = "rules_python", version = "0.23.1") # Dev dependencies @@ -28,23 +28,16 @@ use_repo(python, "python_3_9") tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools") use_repo( tools, - "cmake_3.23.2_toolchains", - "cmake_src", - "gettext_runtime", - "glib_dev", - "glib_src", - "gnumake_src", - "meson_src", - "ninja_1.12.1_toolchains", - "ninja_build_src", - "pkgconfig_src", + "prebuilt_cmake_toolchains", + "prebuilt_ninja_toolchains", "rules_foreign_cc_framework_toolchains", + "toolchain_hub", ) register_toolchains( + "@toolchain_hub//:all", + "@prebuilt_cmake_toolchains//:all", + "@prebuilt_ninja_toolchains//:all", "@rules_foreign_cc_framework_toolchains//:all", - "@cmake_3.23.2_toolchains//:all", - "@ninja_1.12.1_toolchains//:all", - "@python_3_9//:all", "@rules_foreign_cc//toolchains:all", ) diff --git a/examples/MODULE.bazel b/examples/MODULE.bazel index b45694c2..17305d34 100644 --- a/examples/MODULE.bazel +++ b/examples/MODULE.bazel @@ -7,16 +7,15 @@ local_path_override( tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools") tools.cmake(version = "3.23.1") tools.ninja(version = "1.11.1") -use_repo( - tools, - "meson_src", -) +tools.meson(version = "1.5.1") -bazel_dep(name = "platforms", version = "0.0.6") -bazel_dep(name = "rules_swift", version = "1.6.0", repo_name = "build_bazel_rules_swift") +use_repo(tools, "meson_1.5.1_src") + +bazel_dep(name = "platforms", version = "0.0.9") +bazel_dep(name = "rules_swift", version = "1.17.0", repo_name = "build_bazel_rules_swift") bazel_dep(name = "rules_apple", version = "3.4.0", repo_name = "build_bazel_rules_apple") -bazel_dep(name = "apple_support", version = "1.12.0", repo_name = "build_bazel_apple_support") -bazel_dep(name = "rules_python", version = "0.23.0") +bazel_dep(name = "apple_support", version = "1.14.0", repo_name = "build_bazel_apple_support") +bazel_dep(name = "rules_python", version = "0.23.1") bazel_dep(name = "rules_cc", version = "0.0.9") python = use_extension("@rules_python//python/extensions:python.bzl", "python") diff --git a/examples/third_party/zlib/zlib_repositories.bzl b/examples/third_party/zlib/zlib_repositories.bzl index a093f88e..93cb508b 100644 --- a/examples/third_party/zlib/zlib_repositories.bzl +++ b/examples/third_party/zlib/zlib_repositories.bzl @@ -17,6 +17,7 @@ def zlib_repositories(): ], urls = [ "https://zlib.net/zlib-1.2.13.tar.gz", + "https://zlib.net/archive/zlib-1.2.13.tar.gz", "https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.13.tar.gz", ], ) diff --git a/foreign_cc/extensions.bzl b/foreign_cc/extensions.bzl index f195d3af..a72c7c32 100644 --- a/foreign_cc/extensions.bzl +++ b/foreign_cc/extensions.bzl @@ -1,51 +1,123 @@ """Entry point for extensions used by bzlmod.""" -load("//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") -load("//toolchains:prebuilt_toolchains.bzl", "prebuilt_toolchains") - -_DEFAULT_CMAKE_VERSION = "3.23.2" -_DEFAULT_NINJA_VERSION = "1.12.1" +load("//foreign_cc:repositories.bzl", "DEFAULT_CMAKE_VERSION", "DEFAULT_MAKE_VERSION", "DEFAULT_MESON_VERSION", "DEFAULT_NINJA_VERSION", "DEFAULT_PKGCONFIG_VERSION") +load("//foreign_cc/private/bzlmod:toolchain_hub.bzl", "hub_repo") +load("//foreign_cc/private/framework:toolchain.bzl", "register_framework_toolchains") +load("//toolchains:built_toolchains.bzl", "make_toolchain", "meson_toolchain", "pkgconfig_toolchain", cmake_toolchains_src = "cmake_toolchain", ninja_toolchains_src = "ninja_toolchain") +load("//toolchains:prebuilt_toolchains.bzl", "cmake_toolchains", "ninja_toolchains") cmake_toolchain_version = tag_class(attrs = { - "version": attr.string(doc = "The cmake version", default = _DEFAULT_CMAKE_VERSION), + "version": attr.string(doc = "The cmake version", default = DEFAULT_CMAKE_VERSION), +}) + +make_toolchain_version = tag_class(attrs = { + "version": attr.string(doc = "The GNU Make version", default = DEFAULT_MAKE_VERSION), +}) + +meson_toolchain_version = tag_class(attrs = { + "version": attr.string(doc = "The meson version", default = DEFAULT_MESON_VERSION), }) ninja_toolchain_version = tag_class(attrs = { - "version": attr.string(doc = "The ninja version", default = _DEFAULT_NINJA_VERSION), + "version": attr.string(doc = "The ninja version", default = DEFAULT_NINJA_VERSION), +}) + +pkgconfig_toolchain_version = tag_class(attrs = { + "version": attr.string(doc = "The pkgconfig version", default = DEFAULT_PKGCONFIG_VERSION), }) def _init(module_ctx): - rules_foreign_cc_dependencies( - register_toolchains = False, - register_built_tools = True, - register_default_tools = False, - register_preinstalled_tools = False, - register_built_pkgconfig_toolchain = True, - ) - - versions = { - "cmake": _DEFAULT_CMAKE_VERSION, - "ninja": _DEFAULT_NINJA_VERSION, - } + cmake_registered = False + make_registered = False + meson_registered = False + ninja_registered = False + pkgconfig_registered = False + toolchain_names = [] + toolchain_target = [] + toolchain_types = [] for mod in module_ctx.modules: - if not mod.is_root: + if mod.is_root: for toolchain in mod.tags.cmake: - versions["cmake"] = toolchain.version + cmake_toolchains(toolchain.version) + cmake_toolchains_src(toolchain.version) + + toolchain_names.append("cmake_{}_from_src".format(toolchain.version)) + toolchain_types.append("@rules_foreign_cc//toolchains:cmake_toolchain") + toolchain_target.append("@cmake_{}_src//:built_cmake".format(toolchain.version)) + cmake_registered = True + + for toolchain in mod.tags.make: + make_toolchain(toolchain.version) + toolchain_names.append("make_{}_from_src".format(toolchain.version)) + toolchain_types.append("@rules_foreign_cc//toolchains:make_toolchain") + toolchain_target.append("@gnumake_{}_src//:built_make".format(toolchain.version)) + make_registered = True + + for toolchain in mod.tags.meson: + meson_toolchain(toolchain.version) + toolchain_names.append("meson_{}_from_src".format(toolchain.version)) + toolchain_types.append("@rules_foreign_cc//toolchains:meson_toolchain") + toolchain_target.append("@meson_{}_src//:built_meson".format(toolchain.version)) + meson_registered = True for toolchain in mod.tags.ninja: - versions["ninja"] = toolchain.version + ninja_toolchains(toolchain.version) + ninja_toolchains_src(toolchain.version) - prebuilt_toolchains( - cmake_version = versions["cmake"], - ninja_version = versions["ninja"], - register_toolchains = False, - ) + toolchain_names.append("ninja_{}_from_src".format(toolchain.version)) + toolchain_types.append("@rules_foreign_cc//toolchains:ninja_toolchain") + toolchain_target.append("@ninja_{}_src//:built_ninja".format(toolchain.version)) + ninja_registered = True + + for toolchain in mod.tags.pkgconfig: + pkgconfig_toolchain(toolchain.version) + toolchain_names.append("pkgconfig_{}_from_src".format(toolchain.version)) + toolchain_types.append("@rules_foreign_cc//toolchains:pkgconfig_toolchain") + toolchain_target.append("@pkgconfig_{}_src//:built_pkgconfig".format(toolchain.version)) + pkgconfig_registered = True + + if not cmake_registered: + cmake_toolchains(DEFAULT_CMAKE_VERSION) + cmake_toolchains_src(DEFAULT_CMAKE_VERSION) + + toolchain_names.append("cmake_{}_from_src".format(DEFAULT_CMAKE_VERSION)) + toolchain_types.append("@rules_foreign_cc//toolchains:cmake_toolchain") + toolchain_target.append("@cmake_{}_src//:built_cmake".format(DEFAULT_CMAKE_VERSION)) + + if not make_registered: + make_toolchain(DEFAULT_MAKE_VERSION) + toolchain_names.append("make_{}_from_src".format(DEFAULT_MAKE_VERSION)) + toolchain_types.append("@rules_foreign_cc//toolchains:make_toolchain") + toolchain_target.append("@gnumake_{}_src//:built_make".format(DEFAULT_MAKE_VERSION)) + if not meson_registered: + meson_toolchain(DEFAULT_MESON_VERSION) + toolchain_names.append("meson_{}_from_src".format(DEFAULT_MESON_VERSION)) + toolchain_types.append("@rules_foreign_cc//toolchains:meson_toolchain") + toolchain_target.append("@meson_{}_src//:built_meson".format(DEFAULT_MESON_VERSION)) + if not ninja_registered: + ninja_toolchains(DEFAULT_NINJA_VERSION) + ninja_toolchains_src(DEFAULT_NINJA_VERSION) + toolchain_names.append("ninja_{}_from_src".format(DEFAULT_NINJA_VERSION)) + toolchain_types.append("@rules_foreign_cc//toolchains:ninja_toolchain") + toolchain_target.append("@ninja_{}_src//:built_ninja".format(DEFAULT_NINJA_VERSION)) + if not pkgconfig_registered: + pkgconfig_toolchain(DEFAULT_PKGCONFIG_VERSION) + toolchain_names.append("pkgconfig_{}_from_src".format(DEFAULT_PKGCONFIG_VERSION)) + toolchain_types.append("@rules_foreign_cc//toolchains:pkgconfig_toolchain") + toolchain_target.append("@pkgconfig_{}_src//:built_pkgconfig".format(DEFAULT_PKGCONFIG_VERSION)) + + register_framework_toolchains(register_toolchains = False) + + hub_repo(name = "toolchain_hub", toolchain_names = toolchain_names, toolchain_target = toolchain_target, toolchain_types = toolchain_types) tools = module_extension( implementation = _init, tag_classes = { "cmake": cmake_toolchain_version, + "make": make_toolchain_version, + "meson": meson_toolchain_version, "ninja": ninja_toolchain_version, + "pkgconfig": pkgconfig_toolchain_version, }, ) diff --git a/foreign_cc/meson.bzl b/foreign_cc/meson.bzl index dcce35d8..72683964 100644 --- a/foreign_cc/meson.bzl +++ b/foreign_cc/meson.bzl @@ -212,8 +212,8 @@ def meson_with_requirements(name, requirements, **kwargs): meson_tool( name = "meson_tool_for_{}".format(name), - main = "@meson_src//:meson.py", - data = ["@meson_src//:runtime"], + main = "@meson_1.5.1_src//:meson.py", + data = ["@meson_1.5.1_src//:runtime"], requirements = requirements, tags = tags + ["manual"], ) diff --git a/foreign_cc/private/bzlmod/BUILD.bazel b/foreign_cc/private/bzlmod/BUILD.bazel new file mode 100644 index 00000000..e69de29b diff --git a/foreign_cc/private/bzlmod/toolchain_hub.bzl b/foreign_cc/private/bzlmod/toolchain_hub.bzl new file mode 100644 index 00000000..67cdf736 --- /dev/null +++ b/foreign_cc/private/bzlmod/toolchain_hub.bzl @@ -0,0 +1,33 @@ +def _hub_repo_impl(rctx): + if len(rctx.attr.toolchain_names) != len(rctx.attr.toolchain_target): + fail("toolchain_names and toolchain_target must have the same length.") + if len(rctx.attr.toolchain_names) != len(rctx.attr.toolchain_types): + fail("toolchain_names and toolchain_types must have the same length.") + + toolchains = ["toolchain(name = '{}', toolchain = '{}', toolchain_type = '{}')".format(name, target, type) for (name, target, type) in zip(rctx.attr.toolchain_names, rctx.attr.toolchain_target, rctx.attr.toolchain_types)] + + rctx.file("BUILD", "\n".join(toolchains), executable = False) + +hub_repo = repository_rule( + doc = """\ +This private rule creates a repo with a BUILD file that containers all the toolchain +rules that have been requested by the user so that the MODULE.bazel file can simply +register `:all` and get all the toolchains registered in a single call. + """, + implementation = _hub_repo_impl, + attrs = { + "toolchain_names": attr.string_list( + doc = "The list of toolchains to include in the hub repo.", + default = [], + ), + "toolchain_target": attr.string_list( + doc = "The list of toolchain targets to include in the hub repo.", + default = [], + ), + "toolchain_types": attr.string_list( + doc = "The list of toolchain targets to include in the hub repo.", + default = [], + ), + # "_rules_foreign_cc_workspace: attr.label(default = Label("//:does_not_matter_what_this_name_is")), + }, +) diff --git a/foreign_cc/repositories.bzl b/foreign_cc/repositories.bzl index 7a818389..e00f6e48 100644 --- a/foreign_cc/repositories.bzl +++ b/foreign_cc/repositories.bzl @@ -5,18 +5,23 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("//foreign_cc/private/framework:toolchain.bzl", "register_framework_toolchains") load("//toolchains:toolchains.bzl", "built_toolchains", "prebuilt_toolchains", "preinstalled_toolchains") +DEFAULT_CMAKE_VERSION = "3.29.1" +DEFAULT_MAKE_VERSION = "4.4.1" +DEFAULT_MESON_VERSION = "1.5.1" +DEFAULT_NINJA_VERSION = "1.12.1" +DEFAULT_PKGCONFIG_VERSION = "0.29.2" + # buildifier: disable=unnamed-macro def rules_foreign_cc_dependencies( native_tools_toolchains = [], register_default_tools = True, - cmake_version = "3.23.2", - make_version = "4.4.1", - ninja_version = "1.12.1", - meson_version = "1.5.1", - pkgconfig_version = "0.29.2", + cmake_version = DEFAULT_CMAKE_VERSION, + make_version = DEFAULT_MAKE_VERSION, + ninja_version = DEFAULT_NINJA_VERSION, + meson_version = DEFAULT_MESON_VERSION, + pkgconfig_version = DEFAULT_PKGCONFIG_VERSION, register_preinstalled_tools = True, register_built_tools = True, - register_toolchains = True, register_built_pkgconfig_toolchain = True): """Call this function from the WORKSPACE file to initialize rules_foreign_cc \ dependencies and let neccesary code generation happen \ @@ -50,8 +55,6 @@ def rules_foreign_cc_dependencies( register_built_tools: If true, toolchains that build the tools from source are registered - register_toolchains: If true, registers the toolchains via native.register_toolchains. Used by bzlmod - register_built_pkgconfig_toolchain: If true, the built pkgconfig toolchain will be registered. On Windows it may be preferrable to set this to False, as this requires the --enable_runfiles bazel option. Also note that building pkgconfig from source under bazel results in paths that are more than 256 characters long, which will not work on Windows unless the following options are added to the .bazelrc and symlinks are enabled in Windows. @@ -61,13 +64,13 @@ def rules_foreign_cc_dependencies( startup --output_user_root=C:/b -> This is required to keep paths as short as possible """ - register_framework_toolchains(register_toolchains = register_toolchains) + register_framework_toolchains(register_toolchains = True) - if register_toolchains: - native.register_toolchains(*native_tools_toolchains) + native.register_toolchains(*native_tools_toolchains) if register_default_tools: - prebuilt_toolchains(cmake_version, ninja_version, register_toolchains) + prebuilt_toolchains(cmake_version, ninja_version) + native.register_toolchains("@prebuilt_cmake_toolchains//:all", "@prebuilt_ninja_toolchains//:all") if register_built_tools: built_toolchains( @@ -76,7 +79,6 @@ def rules_foreign_cc_dependencies( ninja_version = ninja_version, meson_version = meson_version, pkgconfig_version = pkgconfig_version, - register_toolchains = register_toolchains, register_built_pkgconfig_toolchain = register_built_pkgconfig_toolchain, ) diff --git a/toolchains/BUILD.bazel b/toolchains/BUILD.bazel index 69d5c140..4e1ebc0d 100644 --- a/toolchains/BUILD.bazel +++ b/toolchains/BUILD.bazel @@ -67,36 +67,6 @@ current_autoconf_toolchain( name = "current_autoconf_toolchain", ) -toolchain( - name = "built_cmake_toolchain", - toolchain = "//toolchains/private:built_cmake", - toolchain_type = ":cmake_toolchain", -) - -toolchain( - name = "built_ninja_toolchain", - toolchain = "//toolchains/private:built_ninja", - toolchain_type = ":ninja_toolchain", -) - -toolchain( - name = "built_make_toolchain", - toolchain = "//toolchains/private:built_make", - toolchain_type = ":make_toolchain", -) - -toolchain( - name = "built_meson_toolchain", - toolchain = "//toolchains/private:built_meson", - toolchain_type = ":meson_toolchain", -) - -toolchain( - name = "built_pkgconfig_toolchain", - toolchain = "//toolchains/private:built_pkgconfig", - toolchain_type = ":pkgconfig_toolchain", -) - # Preinstalled cmake will always be the default, if toolchain with more exact constraints # is not defined before; registered from workspace_definitions.bzl#rules_foreign_cc_dependencies toolchain( diff --git a/toolchains/built_toolchains.bzl b/toolchains/built_toolchains.bzl index e517c568..969a9d52 100644 --- a/toolchains/built_toolchains.bzl +++ b/toolchains/built_toolchains.bzl @@ -7,15 +7,106 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@rules_foreign_cc//toolchains:cmake_versions.bzl", _CMAKE_SRCS = "CMAKE_SRCS") -_ALL_CONTENT = """\ +_CMAKE_ALL_CONTENT = """\ +load("@rules_foreign_cc//foreign_cc/built_tools:cmake_build.bzl", "cmake_tool") +load("@rules_foreign_cc//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") + filegroup( name = "all_srcs", srcs = glob(["**"]), +) + +config_setting( + name = "msvc_compiler", + flag_values = { + "@bazel_tools//tools/cpp:compiler": "msvc-cl", + }, +) + +cmake_tool( + name = "cmake_tool", + srcs = ":all_srcs", + tags = ["manual"], +) + +native_tool_toolchain( + name = "built_cmake", + env = select({ + "@platforms//os:windows": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake.exe"}, + "//conditions:default": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake"}, + }), + path = select({ + "@platforms//os:windows": "$(execpath :cmake_tool)/bin/cmake.exe", + "//conditions:default": "$(execpath :cmake_tool)/bin/cmake", + }), + target = ":cmake_tool", + visibility = ["//visibility:public"], +) +""" + +_MAKE_BUILD_FILE_CONTENT = """\ +load("@rules_foreign_cc//foreign_cc/built_tools:make_build.bzl", "make_tool") +load("@rules_foreign_cc//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") + +filegroup( + name = "all_srcs", + srcs = glob(["**"]), +) + +make_tool( + name = "make_tool", + srcs = ":all_srcs", + tags = ["manual"], +) + +native_tool_toolchain( + name = "built_make", + env = select({ + "@platforms//os:windows": {"MAKE": "$(execpath :make_tool)/bin/make.exe"}, + "//conditions:default": {"MAKE": "$(execpath :make_tool)/bin/make"}, + }), + path = select({ + "@platforms//os:windows": "$(execpath :make_tool)/bin/make.exe", + "//conditions:default": "$(execpath :make_tool)/bin/make", + }), + target = ":make_tool", + visibility = ["//visibility:public"], +) +""" + +_NINJA_BUILD_FILE_CONTENT = """\ +load("@rules_foreign_cc//foreign_cc/built_tools:ninja_build.bzl", "ninja_tool") +load("@rules_foreign_cc//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") + +filegroup( + name = "all_srcs", + srcs = glob(["**"]), +) + +ninja_tool( + name = "ninja_tool", + srcs = ":all_srcs", + tags = ["manual"], +) + +native_tool_toolchain( + name = "built_ninja", + env = select({ + "@platforms//os:windows": {"NINJA": "$(execpath :ninja_tool)/bin/ninja.exe"}, + "//conditions:default": {"NINJA": "$(execpath :ninja_tool)/bin/ninja"}, + }), + path = select({ + "@platforms//os:windows": "$(execpath :ninja_tool)/bin/ninja.exe", + "//conditions:default": "$(execpath :ninja_tool)/bin/ninja", + }), + target = ":ninja_tool", visibility = ["//visibility:public"], ) """ _MESON_BUILD_FILE_CONTENT = """\ +load("@rules_foreign_cc//foreign_cc/built_tools:meson_build.bzl", "meson_tool") +load("@rules_foreign_cc//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") exports_files(["meson.py"]) filegroup( @@ -23,10 +114,54 @@ filegroup( srcs = glob(["mesonbuild/**"]), visibility = ["//visibility:public"], ) + +meson_tool( + name = "meson_tool", + data = [":runtime"], + main = ":meson.py", + tags = ["manual"], +) + +native_tool_toolchain( + name = "built_meson", + env = {"MESON": "$(execpath :meson_tool)"}, + path = "$(execpath :meson_tool)", + target = ":meson_tool", +) +""" + +_PKGCONFIG_BUILD_FILE_CONTENT = """\ +load("@rules_foreign_cc//foreign_cc/built_tools:pkgconfig_build.bzl", "pkgconfig_tool") +load("@rules_foreign_cc//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") + +filegroup( + name = "all_srcs", + srcs = glob(["**"]), +) + +pkgconfig_tool( + name = "pkgconfig_tool", + srcs = ":all_srcs", + tags = ["manual"], +) + +native_tool_toolchain( + name = "built_pkgconfig", + env = select({ + "@platforms//os:windows": {"PKG_CONFIG": "$(execpath :pkgconfig_tool)"}, + "//conditions:default": {"PKG_CONFIG": "$(execpath :pkgconfig_tool)/bin/pkg-config"}, + }), + path = select({ + "@platforms//os:windows": "$(execpath :pkgconfig_tool)", + "//conditions:default": "$(execpath :pkgconfig_tool)/bin/pkg-config", + }), + target = ":pkgconfig_tool", + visibility = ["//visibility:public"], +) """ # buildifier: disable=unnamed-macro -def built_toolchains(cmake_version, make_version, ninja_version, meson_version, pkgconfig_version, register_toolchains, register_built_pkgconfig_toolchain): +def built_toolchains(cmake_version, make_version, ninja_version, meson_version, pkgconfig_version, register_built_pkgconfig_toolchain): """ Register toolchains for built tools that will be built from source @@ -42,24 +177,18 @@ def built_toolchains(cmake_version, make_version, ninja_version, meson_version, pkgconfig_version: The pkg-config version to build - register_toolchains: If true, registers the toolchains via native.register_toolchains. Used by bzlmod - register_built_pkgconfig_toolchain: If true, the built pkgconfig toolchain will be registered. """ - _cmake_toolchain(cmake_version, register_toolchains) - _make_toolchain(make_version, register_toolchains) - _ninja_toolchain(ninja_version, register_toolchains) - _meson_toolchain(meson_version, register_toolchains) + cmake_toolchain(cmake_version) + make_toolchain(make_version) + ninja_toolchain(ninja_version) + meson_toolchain(meson_version) if register_built_pkgconfig_toolchain: - _pkgconfig_toolchain(pkgconfig_version, register_toolchains) - -def _cmake_toolchain(version, register_toolchains): - if register_toolchains: - native.register_toolchains( - "@rules_foreign_cc//toolchains:built_cmake_toolchain", - ) + pkgconfig_toolchain(pkgconfig_version) +# buildifier: disable=unnamed-macro +def cmake_toolchain(version): if _CMAKE_SRCS.get(version): cmake_meta = _CMAKE_SRCS[version] urls = cmake_meta[0] @@ -67,8 +196,8 @@ def _cmake_toolchain(version, register_toolchains): sha256 = cmake_meta[2] maybe( http_archive, - name = "cmake_src", - build_file_content = _ALL_CONTENT, + name = "cmake_{}_src".format(version), + build_file_content = _CMAKE_ALL_CONTENT, sha256 = sha256, strip_prefix = prefix, urls = urls, @@ -80,17 +209,13 @@ def _cmake_toolchain(version, register_toolchains): fail("Unsupported cmake version: " + str(version)) -def _make_toolchain(version, register_toolchains): - if register_toolchains: - native.register_toolchains( - "@rules_foreign_cc//toolchains:built_make_toolchain", - ) - +# buildifier: disable=unnamed-macro +def make_toolchain(version): if version == "4.4.1": maybe( http_archive, - name = "gnumake_src", - build_file_content = _ALL_CONTENT, + name = "gnumake_4.4.1_src", + build_file_content = _MAKE_BUILD_FILE_CONTENT, sha256 = "dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3", strip_prefix = "make-4.4.1", urls = [ @@ -103,8 +228,8 @@ def _make_toolchain(version, register_toolchains): if version == "4.4": maybe( http_archive, - name = "gnumake_src", - build_file_content = _ALL_CONTENT, + name = "gnumake_4.4_src", + build_file_content = _MAKE_BUILD_FILE_CONTENT, sha256 = "581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18", strip_prefix = "make-4.4", urls = [ @@ -116,8 +241,8 @@ def _make_toolchain(version, register_toolchains): if version == "4.3": maybe( http_archive, - name = "gnumake_src", - build_file_content = _ALL_CONTENT, + name = "gnumake_4.3_src", + build_file_content = _MAKE_BUILD_FILE_CONTENT, patches = [Label("//toolchains:make-reproducible-bootstrap.patch")], sha256 = "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19", strip_prefix = "make-4.3", @@ -130,16 +255,12 @@ def _make_toolchain(version, register_toolchains): fail("Unsupported make version: " + str(version)) -def _ninja_toolchain(version, register_toolchains): - if register_toolchains: - native.register_toolchains( - "@rules_foreign_cc//toolchains:built_ninja_toolchain", - ) +def ninja_toolchain(version): if version == "1.12.1": maybe( http_archive, - name = "ninja_build_src", - build_file_content = _ALL_CONTENT, + name = "ninja_1.12.1_src", + build_file_content = _NINJA_BUILD_FILE_CONTENT, integrity = "sha256-ghvf9Io/aDvEuztvC1/nstZHz2XVKutjMoyRpsbfKFo=", strip_prefix = "ninja-1.12.1", urls = [ @@ -151,8 +272,8 @@ def _ninja_toolchain(version, register_toolchains): if version == "1.12.0": maybe( http_archive, - name = "ninja_build_src", - build_file_content = _ALL_CONTENT, + name = "ninja_1.12.0_src", + build_file_content = _NINJA_BUILD_FILE_CONTENT, integrity = "sha256-iyyGzUg9x/y3l1xexzKRNdIQCZqJvH2wWQoHsLv+SaU=", strip_prefix = "ninja-1.12.0", urls = [ @@ -164,8 +285,8 @@ def _ninja_toolchain(version, register_toolchains): if version == "1.11.1": maybe( http_archive, - name = "ninja_build_src", - build_file_content = _ALL_CONTENT, + name = "ninja_1.11.1_src", + build_file_content = _NINJA_BUILD_FILE_CONTENT, sha256 = "31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea", strip_prefix = "ninja-1.11.1", urls = [ @@ -177,8 +298,8 @@ def _ninja_toolchain(version, register_toolchains): if version == "1.11.0": maybe( http_archive, - name = "ninja_build_src", - build_file_content = _ALL_CONTENT, + name = "ninja_1.11.0_src", + build_file_content = _NINJA_BUILD_FILE_CONTENT, sha256 = "3c6ba2e66400fe3f1ae83deb4b235faf3137ec20bd5b08c29bfc368db143e4c6", strip_prefix = "ninja-1.11.0", urls = [ @@ -190,8 +311,8 @@ def _ninja_toolchain(version, register_toolchains): if version == "1.10.2": maybe( http_archive, - name = "ninja_build_src", - build_file_content = _ALL_CONTENT, + name = "ninja_1.10.2_src", + build_file_content = _NINJA_BUILD_FILE_CONTENT, sha256 = "ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed", strip_prefix = "ninja-1.10.2", urls = [ @@ -203,15 +324,12 @@ def _ninja_toolchain(version, register_toolchains): fail("Unsupported ninja version: " + str(version)) -def _meson_toolchain(version, register_toolchains): - if register_toolchains: - native.register_toolchains( - "@rules_foreign_cc//toolchains:built_meson_toolchain", - ) +# buildifier: disable=unnamed-macro +def meson_toolchain(version): if version == "1.5.1": maybe( http_archive, - name = "meson_src", + name = "meson_1.5.1_src", build_file_content = _MESON_BUILD_FILE_CONTENT, sha256 = "567e533adf255de73a2de35049b99923caf872a455af9ce03e01077e0d384bed", strip_prefix = "meson-1.5.1", @@ -224,7 +342,7 @@ def _meson_toolchain(version, register_toolchains): if version == "1.1.1": maybe( http_archive, - name = "meson_src", + name = "meson_1.1.1_src", build_file_content = _MESON_BUILD_FILE_CONTENT, sha256 = "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c", strip_prefix = "meson-1.1.1", @@ -237,7 +355,7 @@ def _meson_toolchain(version, register_toolchains): if version == "0.63.0": maybe( http_archive, - name = "meson_src", + name = "meson_0.63.0_src", build_file_content = _MESON_BUILD_FILE_CONTENT, sha256 = "3b51d451744c2bc71838524ec8d96cd4f8c4793d5b8d5d0d0a9c8a4f7c94cd6f", strip_prefix = "meson-0.63.0", @@ -250,12 +368,8 @@ def _meson_toolchain(version, register_toolchains): fail("Unsupported meson version: " + str(version)) -def _pkgconfig_toolchain(version, register_toolchains): - if register_toolchains: - native.register_toolchains( - "@rules_foreign_cc//toolchains:built_pkgconfig_toolchain", - ) - +# buildifier: disable=unnamed-macro +def pkgconfig_toolchain(version): maybe( http_archive, name = "glib_dev", @@ -333,8 +447,8 @@ cc_import( if version == "0.29.2": maybe( http_archive, - name = "pkgconfig_src", - build_file_content = _ALL_CONTENT, + name = "pkgconfig_0.29.2_src", + build_file_content = _PKGCONFIG_BUILD_FILE_CONTENT, sha256 = "6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591", strip_prefix = "pkg-config-0.29.2", # The patch is required as bazel does not provide the VCINSTALLDIR or WINDOWSSDKDIR vars diff --git a/toolchains/cmake_versions.bzl b/toolchains/cmake_versions.bzl index a195b5fa..ddbb2126 100644 --- a/toolchains/cmake_versions.bzl +++ b/toolchains/cmake_versions.bzl @@ -533,17 +533,17 @@ CMAKE_SRCS = { ], "3.28.5": [ [ - "https://github.com/Kitware/CMake/releases/download/v3.28.5/cmake-3.28.5.tar.gz", + "https://github.com/Kitware/CMake/releases/download/v3.28.5/cmake-3.28.5.tar.gz" ], "cmake-3.28.5", - "a75d3487ffe817e116a2bf668bf1434af7fe5864cbd4c7e3dcf33dd1a470d659", + "a75d3487ffe817e116a2bf668bf1434af7fe5864cbd4c7e3dcf33dd1a470d659" ], "3.28.6": [ [ - "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6.tar.gz", + "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6.tar.gz" ], "cmake-3.28.6", - "c39c733900affc4eb0e9688b4d1a45435a732105d9bf9cc1e75dd2b9b81a36bb", + "c39c733900affc4eb0e9688b4d1a45435a732105d9bf9cc1e75dd2b9b81a36bb" ], "3.29.0": [ [ @@ -568,24 +568,24 @@ CMAKE_SRCS = { ], "3.29.3": [ [ - "https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3.tar.gz", + "https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3.tar.gz" ], "cmake-3.29.3", - "252aee1448d49caa04954fd5e27d189dd51570557313e7b281636716a238bccb", + "252aee1448d49caa04954fd5e27d189dd51570557313e7b281636716a238bccb" ], "3.29.4": [ [ - "https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4.tar.gz", + "https://github.com/Kitware/CMake/releases/download/v3.29.4/cmake-3.29.4.tar.gz" ], "cmake-3.29.4", - "b1b48d7100bdff0b46e8c8f6a3c86476dbe872c8df39c42b8d104298b3d56a2c", + "b1b48d7100bdff0b46e8c8f6a3c86476dbe872c8df39c42b8d104298b3d56a2c" ], "3.29.5": [ [ - "https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5.tar.gz", + "https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5.tar.gz" ], "cmake-3.29.5", - "dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e", + "dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e" ], "3.3.2": [ [ diff --git a/toolchains/prebuilt_toolchains.bzl b/toolchains/prebuilt_toolchains.bzl index 0ba51826..c9a5b585 100644 --- a/toolchains/prebuilt_toolchains.bzl +++ b/toolchains/prebuilt_toolchains.bzl @@ -62,18 +62,17 @@ native_tool_toolchain( """ # buildifier: disable=unnamed-macro -def prebuilt_toolchains(cmake_version, ninja_version, register_toolchains): +def prebuilt_toolchains(cmake_version, ninja_version): """Register toolchains for pre-built cmake and ninja binaries Args: cmake_version (string): The target cmake version ninja_version (string): The target ninja-build version - register_toolchains (boolean): Whether to call native.register_toolchains or not """ - _cmake_toolchains(cmake_version, register_toolchains) - _ninja_toolchains(ninja_version, register_toolchains) + cmake_toolchains(cmake_version) + ninja_toolchains(ninja_version) -def _cmake_toolchains(version, register_toolchains): +def cmake_toolchains(version): if "3.29.5" == version: maybe( http_archive, @@ -148,40 +147,31 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.5-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.5-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.5-macos-universal": [ - "@platforms//os:macos", + "@platforms//os:macos" ], "cmake-3.29.5-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows", + "@platforms//os:windows" ], "cmake-3.29.5-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.5_toolchains//:cmake-3.29.5-linux-aarch64_toolchain", - "@cmake_3.29.5_toolchains//:cmake-3.29.5-linux-x86_64_toolchain", - "@cmake_3.29.5_toolchains//:cmake-3.29.5-macos-universal_toolchain", - "@cmake_3.29.5_toolchains//:cmake-3.29.5-windows-i386_toolchain", - "@cmake_3.29.5_toolchains//:cmake-3.29.5-windows-x86_64_toolchain", - ) - return if "3.29.4" == version: @@ -258,40 +248,31 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.4-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.4-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.4-macos-universal": [ - "@platforms//os:macos", + "@platforms//os:macos" ], "cmake-3.29.4-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows", + "@platforms//os:windows" ], "cmake-3.29.4-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.4_toolchains//:cmake-3.29.4-linux-aarch64_toolchain", - "@cmake_3.29.4_toolchains//:cmake-3.29.4-linux-x86_64_toolchain", - "@cmake_3.29.4_toolchains//:cmake-3.29.4-macos-universal_toolchain", - "@cmake_3.29.4_toolchains//:cmake-3.29.4-windows-i386_toolchain", - "@cmake_3.29.4_toolchains//:cmake-3.29.4-windows-x86_64_toolchain", - ) - return if "3.29.3" == version: @@ -368,40 +349,31 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.3-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.3-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.29.3-macos-universal": [ - "@platforms//os:macos", + "@platforms//os:macos" ], "cmake-3.29.3-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows", + "@platforms//os:windows" ], "cmake-3.29.3-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.3_toolchains//:cmake-3.29.3-linux-aarch64_toolchain", - "@cmake_3.29.3_toolchains//:cmake-3.29.3-linux-x86_64_toolchain", - "@cmake_3.29.3_toolchains//:cmake-3.29.3-macos-universal_toolchain", - "@cmake_3.29.3_toolchains//:cmake-3.29.3-windows-i386_toolchain", - "@cmake_3.29.3_toolchains//:cmake-3.29.3-windows-x86_64_toolchain", - ) - return if "3.29.2" == version: @@ -478,7 +450,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -503,15 +475,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.2_toolchains//:cmake-3.29.2-linux-aarch64_toolchain", - "@cmake_3.29.2_toolchains//:cmake-3.29.2-linux-x86_64_toolchain", - "@cmake_3.29.2_toolchains//:cmake-3.29.2-macos-universal_toolchain", - "@cmake_3.29.2_toolchains//:cmake-3.29.2-windows-i386_toolchain", - "@cmake_3.29.2_toolchains//:cmake-3.29.2-windows-x86_64_toolchain", - ) - return if "3.29.1" == version: @@ -588,7 +551,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -613,15 +576,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.1_toolchains//:cmake-3.29.1-linux-aarch64_toolchain", - "@cmake_3.29.1_toolchains//:cmake-3.29.1-linux-x86_64_toolchain", - "@cmake_3.29.1_toolchains//:cmake-3.29.1-macos-universal_toolchain", - "@cmake_3.29.1_toolchains//:cmake-3.29.1-windows-i386_toolchain", - "@cmake_3.29.1_toolchains//:cmake-3.29.1-windows-x86_64_toolchain", - ) - return if "3.29.0" == version: @@ -698,7 +652,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.29.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.29.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -723,15 +677,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.29.0_toolchains//:cmake-3.29.0-linux-aarch64_toolchain", - "@cmake_3.29.0_toolchains//:cmake-3.29.0-linux-x86_64_toolchain", - "@cmake_3.29.0_toolchains//:cmake-3.29.0-macos-universal_toolchain", - "@cmake_3.29.0_toolchains//:cmake-3.29.0-windows-i386_toolchain", - "@cmake_3.29.0_toolchains//:cmake-3.29.0-windows-x86_64_toolchain", - ) - return if "3.28.6" == version: @@ -808,40 +753,31 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.6-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.28.6-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.28.6-macos-universal": [ - "@platforms//os:macos", + "@platforms//os:macos" ], "cmake-3.28.6-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows", + "@platforms//os:windows" ], "cmake-3.28.6-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.6_toolchains//:cmake-3.28.6-linux-aarch64_toolchain", - "@cmake_3.28.6_toolchains//:cmake-3.28.6-linux-x86_64_toolchain", - "@cmake_3.28.6_toolchains//:cmake-3.28.6-macos-universal_toolchain", - "@cmake_3.28.6_toolchains//:cmake-3.28.6-windows-i386_toolchain", - "@cmake_3.28.6_toolchains//:cmake-3.28.6-windows-x86_64_toolchain", - ) - return if "3.28.5" == version: @@ -918,40 +854,31 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.5-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.28.5-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "cmake-3.28.5-macos-universal": [ - "@platforms//os:macos", + "@platforms//os:macos" ], "cmake-3.28.5-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows", + "@platforms//os:windows" ], "cmake-3.28.5-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.5_toolchains//:cmake-3.28.5-linux-aarch64_toolchain", - "@cmake_3.28.5_toolchains//:cmake-3.28.5-linux-x86_64_toolchain", - "@cmake_3.28.5_toolchains//:cmake-3.28.5-macos-universal_toolchain", - "@cmake_3.28.5_toolchains//:cmake-3.28.5-windows-i386_toolchain", - "@cmake_3.28.5_toolchains//:cmake-3.28.5-windows-x86_64_toolchain", - ) - return if "3.28.4" == version: @@ -1028,7 +955,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1053,15 +980,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.4_toolchains//:cmake-3.28.4-linux-aarch64_toolchain", - "@cmake_3.28.4_toolchains//:cmake-3.28.4-linux-x86_64_toolchain", - "@cmake_3.28.4_toolchains//:cmake-3.28.4-macos-universal_toolchain", - "@cmake_3.28.4_toolchains//:cmake-3.28.4-windows-i386_toolchain", - "@cmake_3.28.4_toolchains//:cmake-3.28.4-windows-x86_64_toolchain", - ) - return if "3.28.3" == version: @@ -1138,7 +1056,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1163,15 +1081,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.3_toolchains//:cmake-3.28.3-linux-aarch64_toolchain", - "@cmake_3.28.3_toolchains//:cmake-3.28.3-linux-x86_64_toolchain", - "@cmake_3.28.3_toolchains//:cmake-3.28.3-macos-universal_toolchain", - "@cmake_3.28.3_toolchains//:cmake-3.28.3-windows-i386_toolchain", - "@cmake_3.28.3_toolchains//:cmake-3.28.3-windows-x86_64_toolchain", - ) - return if "3.28.2" == version: @@ -1248,7 +1157,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1273,15 +1182,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.2_toolchains//:cmake-3.28.2-linux-aarch64_toolchain", - "@cmake_3.28.2_toolchains//:cmake-3.28.2-linux-x86_64_toolchain", - "@cmake_3.28.2_toolchains//:cmake-3.28.2-macos-universal_toolchain", - "@cmake_3.28.2_toolchains//:cmake-3.28.2-windows-i386_toolchain", - "@cmake_3.28.2_toolchains//:cmake-3.28.2-windows-x86_64_toolchain", - ) - return if "3.28.1" == version: @@ -1358,7 +1258,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1383,15 +1283,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.1_toolchains//:cmake-3.28.1-linux-aarch64_toolchain", - "@cmake_3.28.1_toolchains//:cmake-3.28.1-linux-x86_64_toolchain", - "@cmake_3.28.1_toolchains//:cmake-3.28.1-macos-universal_toolchain", - "@cmake_3.28.1_toolchains//:cmake-3.28.1-windows-i386_toolchain", - "@cmake_3.28.1_toolchains//:cmake-3.28.1-windows-x86_64_toolchain", - ) - return if "3.28.0" == version: @@ -1468,7 +1359,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.28.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.28.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1493,15 +1384,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.28.0_toolchains//:cmake-3.28.0-linux-aarch64_toolchain", - "@cmake_3.28.0_toolchains//:cmake-3.28.0-linux-x86_64_toolchain", - "@cmake_3.28.0_toolchains//:cmake-3.28.0-macos-universal_toolchain", - "@cmake_3.28.0_toolchains//:cmake-3.28.0-windows-i386_toolchain", - "@cmake_3.28.0_toolchains//:cmake-3.28.0-windows-x86_64_toolchain", - ) - return if "3.27.9" == version: @@ -1578,7 +1460,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.9_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.9-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1603,15 +1485,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.9_toolchains//:cmake-3.27.9-linux-aarch64_toolchain", - "@cmake_3.27.9_toolchains//:cmake-3.27.9-linux-x86_64_toolchain", - "@cmake_3.27.9_toolchains//:cmake-3.27.9-macos-universal_toolchain", - "@cmake_3.27.9_toolchains//:cmake-3.27.9-windows-i386_toolchain", - "@cmake_3.27.9_toolchains//:cmake-3.27.9-windows-x86_64_toolchain", - ) - return if "3.27.8" == version: @@ -1688,7 +1561,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.8_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.8-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1713,15 +1586,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.8_toolchains//:cmake-3.27.8-linux-aarch64_toolchain", - "@cmake_3.27.8_toolchains//:cmake-3.27.8-linux-x86_64_toolchain", - "@cmake_3.27.8_toolchains//:cmake-3.27.8-macos-universal_toolchain", - "@cmake_3.27.8_toolchains//:cmake-3.27.8-windows-i386_toolchain", - "@cmake_3.27.8_toolchains//:cmake-3.27.8-windows-x86_64_toolchain", - ) - return if "3.27.7" == version: @@ -1798,7 +1662,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.7_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.7-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1823,15 +1687,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.7_toolchains//:cmake-3.27.7-linux-aarch64_toolchain", - "@cmake_3.27.7_toolchains//:cmake-3.27.7-linux-x86_64_toolchain", - "@cmake_3.27.7_toolchains//:cmake-3.27.7-macos-universal_toolchain", - "@cmake_3.27.7_toolchains//:cmake-3.27.7-windows-i386_toolchain", - "@cmake_3.27.7_toolchains//:cmake-3.27.7-windows-x86_64_toolchain", - ) - return if "3.27.6" == version: @@ -1908,7 +1763,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.6-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -1933,15 +1788,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.6_toolchains//:cmake-3.27.6-linux-aarch64_toolchain", - "@cmake_3.27.6_toolchains//:cmake-3.27.6-linux-x86_64_toolchain", - "@cmake_3.27.6_toolchains//:cmake-3.27.6-macos-universal_toolchain", - "@cmake_3.27.6_toolchains//:cmake-3.27.6-windows-i386_toolchain", - "@cmake_3.27.6_toolchains//:cmake-3.27.6-windows-x86_64_toolchain", - ) - return if "3.27.5" == version: @@ -2018,7 +1864,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2043,15 +1889,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.5_toolchains//:cmake-3.27.5-linux-aarch64_toolchain", - "@cmake_3.27.5_toolchains//:cmake-3.27.5-linux-x86_64_toolchain", - "@cmake_3.27.5_toolchains//:cmake-3.27.5-macos-universal_toolchain", - "@cmake_3.27.5_toolchains//:cmake-3.27.5-windows-i386_toolchain", - "@cmake_3.27.5_toolchains//:cmake-3.27.5-windows-x86_64_toolchain", - ) - return if "3.27.4" == version: @@ -2128,7 +1965,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2153,15 +1990,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.4_toolchains//:cmake-3.27.4-linux-aarch64_toolchain", - "@cmake_3.27.4_toolchains//:cmake-3.27.4-linux-x86_64_toolchain", - "@cmake_3.27.4_toolchains//:cmake-3.27.4-macos-universal_toolchain", - "@cmake_3.27.4_toolchains//:cmake-3.27.4-windows-i386_toolchain", - "@cmake_3.27.4_toolchains//:cmake-3.27.4-windows-x86_64_toolchain", - ) - return if "3.27.3" == version: @@ -2238,7 +2066,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2263,15 +2091,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.3_toolchains//:cmake-3.27.3-linux-aarch64_toolchain", - "@cmake_3.27.3_toolchains//:cmake-3.27.3-linux-x86_64_toolchain", - "@cmake_3.27.3_toolchains//:cmake-3.27.3-macos-universal_toolchain", - "@cmake_3.27.3_toolchains//:cmake-3.27.3-windows-i386_toolchain", - "@cmake_3.27.3_toolchains//:cmake-3.27.3-windows-x86_64_toolchain", - ) - return if "3.27.2" == version: @@ -2348,7 +2167,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2373,15 +2192,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.2_toolchains//:cmake-3.27.2-linux-aarch64_toolchain", - "@cmake_3.27.2_toolchains//:cmake-3.27.2-linux-x86_64_toolchain", - "@cmake_3.27.2_toolchains//:cmake-3.27.2-macos-universal_toolchain", - "@cmake_3.27.2_toolchains//:cmake-3.27.2-windows-i386_toolchain", - "@cmake_3.27.2_toolchains//:cmake-3.27.2-windows-x86_64_toolchain", - ) - return if "3.27.1" == version: @@ -2458,7 +2268,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2483,15 +2293,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.1_toolchains//:cmake-3.27.1-linux-aarch64_toolchain", - "@cmake_3.27.1_toolchains//:cmake-3.27.1-linux-x86_64_toolchain", - "@cmake_3.27.1_toolchains//:cmake-3.27.1-macos-universal_toolchain", - "@cmake_3.27.1_toolchains//:cmake-3.27.1-windows-i386_toolchain", - "@cmake_3.27.1_toolchains//:cmake-3.27.1-windows-x86_64_toolchain", - ) - return if "3.27.0" == version: @@ -2568,7 +2369,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.27.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.27.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2593,15 +2394,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.27.0_toolchains//:cmake-3.27.0-linux-aarch64_toolchain", - "@cmake_3.27.0_toolchains//:cmake-3.27.0-linux-x86_64_toolchain", - "@cmake_3.27.0_toolchains//:cmake-3.27.0-macos-universal_toolchain", - "@cmake_3.27.0_toolchains//:cmake-3.27.0-windows-i386_toolchain", - "@cmake_3.27.0_toolchains//:cmake-3.27.0-windows-x86_64_toolchain", - ) - return if "3.26.6" == version: @@ -2678,7 +2470,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.6-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2703,15 +2495,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.6_toolchains//:cmake-3.26.6-linux-aarch64_toolchain", - "@cmake_3.26.6_toolchains//:cmake-3.26.6-linux-x86_64_toolchain", - "@cmake_3.26.6_toolchains//:cmake-3.26.6-macos-universal_toolchain", - "@cmake_3.26.6_toolchains//:cmake-3.26.6-windows-i386_toolchain", - "@cmake_3.26.6_toolchains//:cmake-3.26.6-windows-x86_64_toolchain", - ) - return if "3.26.5" == version: @@ -2788,7 +2571,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2813,15 +2596,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.5_toolchains//:cmake-3.26.5-linux-aarch64_toolchain", - "@cmake_3.26.5_toolchains//:cmake-3.26.5-linux-x86_64_toolchain", - "@cmake_3.26.5_toolchains//:cmake-3.26.5-macos-universal_toolchain", - "@cmake_3.26.5_toolchains//:cmake-3.26.5-windows-i386_toolchain", - "@cmake_3.26.5_toolchains//:cmake-3.26.5-windows-x86_64_toolchain", - ) - return if "3.26.4" == version: @@ -2898,7 +2672,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -2923,15 +2697,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.4_toolchains//:cmake-3.26.4-linux-aarch64_toolchain", - "@cmake_3.26.4_toolchains//:cmake-3.26.4-linux-x86_64_toolchain", - "@cmake_3.26.4_toolchains//:cmake-3.26.4-macos-universal_toolchain", - "@cmake_3.26.4_toolchains//:cmake-3.26.4-windows-i386_toolchain", - "@cmake_3.26.4_toolchains//:cmake-3.26.4-windows-x86_64_toolchain", - ) - return if "3.26.3" == version: @@ -3008,7 +2773,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3033,15 +2798,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.3_toolchains//:cmake-3.26.3-linux-aarch64_toolchain", - "@cmake_3.26.3_toolchains//:cmake-3.26.3-linux-x86_64_toolchain", - "@cmake_3.26.3_toolchains//:cmake-3.26.3-macos-universal_toolchain", - "@cmake_3.26.3_toolchains//:cmake-3.26.3-windows-i386_toolchain", - "@cmake_3.26.3_toolchains//:cmake-3.26.3-windows-x86_64_toolchain", - ) - return if "3.26.2" == version: @@ -3118,7 +2874,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3143,15 +2899,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.2_toolchains//:cmake-3.26.2-linux-aarch64_toolchain", - "@cmake_3.26.2_toolchains//:cmake-3.26.2-linux-x86_64_toolchain", - "@cmake_3.26.2_toolchains//:cmake-3.26.2-macos-universal_toolchain", - "@cmake_3.26.2_toolchains//:cmake-3.26.2-windows-i386_toolchain", - "@cmake_3.26.2_toolchains//:cmake-3.26.2-windows-x86_64_toolchain", - ) - return if "3.26.1" == version: @@ -3228,7 +2975,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3253,15 +3000,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.1_toolchains//:cmake-3.26.1-linux-aarch64_toolchain", - "@cmake_3.26.1_toolchains//:cmake-3.26.1-linux-x86_64_toolchain", - "@cmake_3.26.1_toolchains//:cmake-3.26.1-macos-universal_toolchain", - "@cmake_3.26.1_toolchains//:cmake-3.26.1-windows-i386_toolchain", - "@cmake_3.26.1_toolchains//:cmake-3.26.1-windows-x86_64_toolchain", - ) - return if "3.26.0" == version: @@ -3338,7 +3076,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.26.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.26.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3363,15 +3101,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.26.0_toolchains//:cmake-3.26.0-linux-aarch64_toolchain", - "@cmake_3.26.0_toolchains//:cmake-3.26.0-linux-x86_64_toolchain", - "@cmake_3.26.0_toolchains//:cmake-3.26.0-macos-universal_toolchain", - "@cmake_3.26.0_toolchains//:cmake-3.26.0-windows-i386_toolchain", - "@cmake_3.26.0_toolchains//:cmake-3.26.0-windows-x86_64_toolchain", - ) - return if "3.25.3" == version: @@ -3448,7 +3177,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.25.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.25.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3473,15 +3202,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.25.3_toolchains//:cmake-3.25.3-linux-aarch64_toolchain", - "@cmake_3.25.3_toolchains//:cmake-3.25.3-linux-x86_64_toolchain", - "@cmake_3.25.3_toolchains//:cmake-3.25.3-macos-universal_toolchain", - "@cmake_3.25.3_toolchains//:cmake-3.25.3-windows-i386_toolchain", - "@cmake_3.25.3_toolchains//:cmake-3.25.3-windows-x86_64_toolchain", - ) - return if "3.25.2" == version: @@ -3558,7 +3278,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.25.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.25.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3583,15 +3303,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.25.2_toolchains//:cmake-3.25.2-linux-aarch64_toolchain", - "@cmake_3.25.2_toolchains//:cmake-3.25.2-linux-x86_64_toolchain", - "@cmake_3.25.2_toolchains//:cmake-3.25.2-macos-universal_toolchain", - "@cmake_3.25.2_toolchains//:cmake-3.25.2-windows-i386_toolchain", - "@cmake_3.25.2_toolchains//:cmake-3.25.2-windows-x86_64_toolchain", - ) - return if "3.25.1" == version: @@ -3668,7 +3379,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.25.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.25.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3693,15 +3404,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.25.1_toolchains//:cmake-3.25.1-linux-aarch64_toolchain", - "@cmake_3.25.1_toolchains//:cmake-3.25.1-linux-x86_64_toolchain", - "@cmake_3.25.1_toolchains//:cmake-3.25.1-macos-universal_toolchain", - "@cmake_3.25.1_toolchains//:cmake-3.25.1-windows-i386_toolchain", - "@cmake_3.25.1_toolchains//:cmake-3.25.1-windows-x86_64_toolchain", - ) - return if "3.25.0" == version: @@ -3778,7 +3480,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.25.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.25.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3803,15 +3505,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.25.0_toolchains//:cmake-3.25.0-linux-aarch64_toolchain", - "@cmake_3.25.0_toolchains//:cmake-3.25.0-linux-x86_64_toolchain", - "@cmake_3.25.0_toolchains//:cmake-3.25.0-macos-universal_toolchain", - "@cmake_3.25.0_toolchains//:cmake-3.25.0-windows-i386_toolchain", - "@cmake_3.25.0_toolchains//:cmake-3.25.0-windows-x86_64_toolchain", - ) - return if "3.24.4" == version: @@ -3888,7 +3581,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.24.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.24.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -3913,15 +3606,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.24.4_toolchains//:cmake-3.24.4-linux-aarch64_toolchain", - "@cmake_3.24.4_toolchains//:cmake-3.24.4-linux-x86_64_toolchain", - "@cmake_3.24.4_toolchains//:cmake-3.24.4-macos-universal_toolchain", - "@cmake_3.24.4_toolchains//:cmake-3.24.4-windows-i386_toolchain", - "@cmake_3.24.4_toolchains//:cmake-3.24.4-windows-x86_64_toolchain", - ) - return if "3.24.3" == version: @@ -3998,7 +3682,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.24.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.24.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4023,15 +3707,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.24.3_toolchains//:cmake-3.24.3-linux-aarch64_toolchain", - "@cmake_3.24.3_toolchains//:cmake-3.24.3-linux-x86_64_toolchain", - "@cmake_3.24.3_toolchains//:cmake-3.24.3-macos-universal_toolchain", - "@cmake_3.24.3_toolchains//:cmake-3.24.3-windows-i386_toolchain", - "@cmake_3.24.3_toolchains//:cmake-3.24.3-windows-x86_64_toolchain", - ) - return if "3.24.2" == version: @@ -4108,7 +3783,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.24.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.24.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4133,15 +3808,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.24.2_toolchains//:cmake-3.24.2-linux-aarch64_toolchain", - "@cmake_3.24.2_toolchains//:cmake-3.24.2-linux-x86_64_toolchain", - "@cmake_3.24.2_toolchains//:cmake-3.24.2-macos-universal_toolchain", - "@cmake_3.24.2_toolchains//:cmake-3.24.2-windows-i386_toolchain", - "@cmake_3.24.2_toolchains//:cmake-3.24.2-windows-x86_64_toolchain", - ) - return if "3.24.1" == version: @@ -4218,7 +3884,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.24.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.24.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4243,15 +3909,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.24.1_toolchains//:cmake-3.24.1-linux-aarch64_toolchain", - "@cmake_3.24.1_toolchains//:cmake-3.24.1-linux-x86_64_toolchain", - "@cmake_3.24.1_toolchains//:cmake-3.24.1-macos-universal_toolchain", - "@cmake_3.24.1_toolchains//:cmake-3.24.1-windows-i386_toolchain", - "@cmake_3.24.1_toolchains//:cmake-3.24.1-windows-x86_64_toolchain", - ) - return if "3.24.0" == version: @@ -4328,7 +3985,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.24.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.24.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4353,15 +4010,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.24.0_toolchains//:cmake-3.24.0-linux-aarch64_toolchain", - "@cmake_3.24.0_toolchains//:cmake-3.24.0-linux-x86_64_toolchain", - "@cmake_3.24.0_toolchains//:cmake-3.24.0-macos-universal_toolchain", - "@cmake_3.24.0_toolchains//:cmake-3.24.0-windows-i386_toolchain", - "@cmake_3.24.0_toolchains//:cmake-3.24.0-windows-x86_64_toolchain", - ) - return if "3.23.5" == version: @@ -4438,7 +4086,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4463,15 +4111,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.5_toolchains//:cmake-3.23.5-linux-aarch64_toolchain", - "@cmake_3.23.5_toolchains//:cmake-3.23.5-linux-x86_64_toolchain", - "@cmake_3.23.5_toolchains//:cmake-3.23.5-macos-universal_toolchain", - "@cmake_3.23.5_toolchains//:cmake-3.23.5-windows-i386_toolchain", - "@cmake_3.23.5_toolchains//:cmake-3.23.5-windows-x86_64_toolchain", - ) - return if "3.23.4" == version: @@ -4548,7 +4187,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4573,15 +4212,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.4_toolchains//:cmake-3.23.4-linux-aarch64_toolchain", - "@cmake_3.23.4_toolchains//:cmake-3.23.4-linux-x86_64_toolchain", - "@cmake_3.23.4_toolchains//:cmake-3.23.4-macos-universal_toolchain", - "@cmake_3.23.4_toolchains//:cmake-3.23.4-windows-i386_toolchain", - "@cmake_3.23.4_toolchains//:cmake-3.23.4-windows-x86_64_toolchain", - ) - return if "3.23.3" == version: @@ -4658,7 +4288,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4683,15 +4313,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.3_toolchains//:cmake-3.23.3-linux-aarch64_toolchain", - "@cmake_3.23.3_toolchains//:cmake-3.23.3-linux-x86_64_toolchain", - "@cmake_3.23.3_toolchains//:cmake-3.23.3-macos-universal_toolchain", - "@cmake_3.23.3_toolchains//:cmake-3.23.3-windows-i386_toolchain", - "@cmake_3.23.3_toolchains//:cmake-3.23.3-windows-x86_64_toolchain", - ) - return if "3.23.2" == version: @@ -4768,7 +4389,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4793,15 +4414,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.2_toolchains//:cmake-3.23.2-linux-aarch64_toolchain", - "@cmake_3.23.2_toolchains//:cmake-3.23.2-linux-x86_64_toolchain", - "@cmake_3.23.2_toolchains//:cmake-3.23.2-macos-universal_toolchain", - "@cmake_3.23.2_toolchains//:cmake-3.23.2-windows-i386_toolchain", - "@cmake_3.23.2_toolchains//:cmake-3.23.2-windows-x86_64_toolchain", - ) - return if "3.23.1" == version: @@ -4878,7 +4490,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -4903,15 +4515,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.1_toolchains//:cmake-3.23.1-linux-aarch64_toolchain", - "@cmake_3.23.1_toolchains//:cmake-3.23.1-linux-x86_64_toolchain", - "@cmake_3.23.1_toolchains//:cmake-3.23.1-macos-universal_toolchain", - "@cmake_3.23.1_toolchains//:cmake-3.23.1-windows-i386_toolchain", - "@cmake_3.23.1_toolchains//:cmake-3.23.1-windows-x86_64_toolchain", - ) - return if "3.23.0" == version: @@ -4988,7 +4591,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.23.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.23.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5013,15 +4616,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.23.0_toolchains//:cmake-3.23.0-linux-aarch64_toolchain", - "@cmake_3.23.0_toolchains//:cmake-3.23.0-linux-x86_64_toolchain", - "@cmake_3.23.0_toolchains//:cmake-3.23.0-macos-universal_toolchain", - "@cmake_3.23.0_toolchains//:cmake-3.23.0-windows-i386_toolchain", - "@cmake_3.23.0_toolchains//:cmake-3.23.0-windows-x86_64_toolchain", - ) - return if "3.22.6" == version: @@ -5098,7 +4692,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.6-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5123,15 +4717,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.6_toolchains//:cmake-3.22.6-linux-aarch64_toolchain", - "@cmake_3.22.6_toolchains//:cmake-3.22.6-linux-x86_64_toolchain", - "@cmake_3.22.6_toolchains//:cmake-3.22.6-macos-universal_toolchain", - "@cmake_3.22.6_toolchains//:cmake-3.22.6-windows-i386_toolchain", - "@cmake_3.22.6_toolchains//:cmake-3.22.6-windows-x86_64_toolchain", - ) - return if "3.22.5" == version: @@ -5208,7 +4793,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5233,15 +4818,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.5_toolchains//:cmake-3.22.5-linux-aarch64_toolchain", - "@cmake_3.22.5_toolchains//:cmake-3.22.5-linux-x86_64_toolchain", - "@cmake_3.22.5_toolchains//:cmake-3.22.5-macos-universal_toolchain", - "@cmake_3.22.5_toolchains//:cmake-3.22.5-windows-i386_toolchain", - "@cmake_3.22.5_toolchains//:cmake-3.22.5-windows-x86_64_toolchain", - ) - return if "3.22.4" == version: @@ -5318,7 +4894,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5343,15 +4919,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.4_toolchains//:cmake-3.22.4-linux-aarch64_toolchain", - "@cmake_3.22.4_toolchains//:cmake-3.22.4-linux-x86_64_toolchain", - "@cmake_3.22.4_toolchains//:cmake-3.22.4-macos-universal_toolchain", - "@cmake_3.22.4_toolchains//:cmake-3.22.4-windows-i386_toolchain", - "@cmake_3.22.4_toolchains//:cmake-3.22.4-windows-x86_64_toolchain", - ) - return if "3.22.3" == version: @@ -5428,7 +4995,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5453,15 +5020,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.3_toolchains//:cmake-3.22.3-linux-aarch64_toolchain", - "@cmake_3.22.3_toolchains//:cmake-3.22.3-linux-x86_64_toolchain", - "@cmake_3.22.3_toolchains//:cmake-3.22.3-macos-universal_toolchain", - "@cmake_3.22.3_toolchains//:cmake-3.22.3-windows-i386_toolchain", - "@cmake_3.22.3_toolchains//:cmake-3.22.3-windows-x86_64_toolchain", - ) - return if "3.22.2" == version: @@ -5538,7 +5096,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5563,15 +5121,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.2_toolchains//:cmake-3.22.2-linux-aarch64_toolchain", - "@cmake_3.22.2_toolchains//:cmake-3.22.2-linux-x86_64_toolchain", - "@cmake_3.22.2_toolchains//:cmake-3.22.2-macos-universal_toolchain", - "@cmake_3.22.2_toolchains//:cmake-3.22.2-windows-i386_toolchain", - "@cmake_3.22.2_toolchains//:cmake-3.22.2-windows-x86_64_toolchain", - ) - return if "3.22.1" == version: @@ -5648,7 +5197,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5673,15 +5222,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.1_toolchains//:cmake-3.22.1-linux-aarch64_toolchain", - "@cmake_3.22.1_toolchains//:cmake-3.22.1-linux-x86_64_toolchain", - "@cmake_3.22.1_toolchains//:cmake-3.22.1-macos-universal_toolchain", - "@cmake_3.22.1_toolchains//:cmake-3.22.1-windows-i386_toolchain", - "@cmake_3.22.1_toolchains//:cmake-3.22.1-windows-x86_64_toolchain", - ) - return if "3.22.0" == version: @@ -5758,7 +5298,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.22.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.22.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5783,15 +5323,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.22.0_toolchains//:cmake-3.22.0-linux-aarch64_toolchain", - "@cmake_3.22.0_toolchains//:cmake-3.22.0-linux-x86_64_toolchain", - "@cmake_3.22.0_toolchains//:cmake-3.22.0-macos-universal_toolchain", - "@cmake_3.22.0_toolchains//:cmake-3.22.0-windows-i386_toolchain", - "@cmake_3.22.0_toolchains//:cmake-3.22.0-windows-x86_64_toolchain", - ) - return if "3.21.7" == version: @@ -5868,7 +5399,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.7_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.7-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -5893,15 +5424,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.7_toolchains//:cmake-3.21.7-linux-aarch64_toolchain", - "@cmake_3.21.7_toolchains//:cmake-3.21.7-linux-x86_64_toolchain", - "@cmake_3.21.7_toolchains//:cmake-3.21.7-macos-universal_toolchain", - "@cmake_3.21.7_toolchains//:cmake-3.21.7-windows-i386_toolchain", - "@cmake_3.21.7_toolchains//:cmake-3.21.7-windows-x86_64_toolchain", - ) - return if "3.21.6" == version: @@ -5978,7 +5500,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.6-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6003,15 +5525,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.6_toolchains//:cmake-3.21.6-linux-aarch64_toolchain", - "@cmake_3.21.6_toolchains//:cmake-3.21.6-linux-x86_64_toolchain", - "@cmake_3.21.6_toolchains//:cmake-3.21.6-macos-universal_toolchain", - "@cmake_3.21.6_toolchains//:cmake-3.21.6-windows-i386_toolchain", - "@cmake_3.21.6_toolchains//:cmake-3.21.6-windows-x86_64_toolchain", - ) - return if "3.21.5" == version: @@ -6088,7 +5601,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6113,15 +5626,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.5_toolchains//:cmake-3.21.5-linux-aarch64_toolchain", - "@cmake_3.21.5_toolchains//:cmake-3.21.5-linux-x86_64_toolchain", - "@cmake_3.21.5_toolchains//:cmake-3.21.5-macos-universal_toolchain", - "@cmake_3.21.5_toolchains//:cmake-3.21.5-windows-i386_toolchain", - "@cmake_3.21.5_toolchains//:cmake-3.21.5-windows-x86_64_toolchain", - ) - return if "3.21.4" == version: @@ -6198,7 +5702,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6223,15 +5727,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.4_toolchains//:cmake-3.21.4-linux-aarch64_toolchain", - "@cmake_3.21.4_toolchains//:cmake-3.21.4-linux-x86_64_toolchain", - "@cmake_3.21.4_toolchains//:cmake-3.21.4-macos-universal_toolchain", - "@cmake_3.21.4_toolchains//:cmake-3.21.4-windows-i386_toolchain", - "@cmake_3.21.4_toolchains//:cmake-3.21.4-windows-x86_64_toolchain", - ) - return if "3.21.3" == version: @@ -6308,7 +5803,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6333,15 +5828,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.3_toolchains//:cmake-3.21.3-linux-aarch64_toolchain", - "@cmake_3.21.3_toolchains//:cmake-3.21.3-linux-x86_64_toolchain", - "@cmake_3.21.3_toolchains//:cmake-3.21.3-macos-universal_toolchain", - "@cmake_3.21.3_toolchains//:cmake-3.21.3-windows-i386_toolchain", - "@cmake_3.21.3_toolchains//:cmake-3.21.3-windows-x86_64_toolchain", - ) - return if "3.21.2" == version: @@ -6418,7 +5904,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6443,15 +5929,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.2_toolchains//:cmake-3.21.2-linux-aarch64_toolchain", - "@cmake_3.21.2_toolchains//:cmake-3.21.2-linux-x86_64_toolchain", - "@cmake_3.21.2_toolchains//:cmake-3.21.2-macos-universal_toolchain", - "@cmake_3.21.2_toolchains//:cmake-3.21.2-windows-i386_toolchain", - "@cmake_3.21.2_toolchains//:cmake-3.21.2-windows-x86_64_toolchain", - ) - return if "3.21.1" == version: @@ -6528,7 +6005,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6553,15 +6030,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.1_toolchains//:cmake-3.21.1-linux-aarch64_toolchain", - "@cmake_3.21.1_toolchains//:cmake-3.21.1-linux-x86_64_toolchain", - "@cmake_3.21.1_toolchains//:cmake-3.21.1-macos-universal_toolchain", - "@cmake_3.21.1_toolchains//:cmake-3.21.1-windows-i386_toolchain", - "@cmake_3.21.1_toolchains//:cmake-3.21.1-windows-x86_64_toolchain", - ) - return if "3.21.0" == version: @@ -6638,7 +6106,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.21.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.21.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6663,15 +6131,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.21.0_toolchains//:cmake-3.21.0-linux-aarch64_toolchain", - "@cmake_3.21.0_toolchains//:cmake-3.21.0-linux-x86_64_toolchain", - "@cmake_3.21.0_toolchains//:cmake-3.21.0-macos-universal_toolchain", - "@cmake_3.21.0_toolchains//:cmake-3.21.0-windows-i386_toolchain", - "@cmake_3.21.0_toolchains//:cmake-3.21.0-windows-x86_64_toolchain", - ) - return if "3.20.6" == version: @@ -6748,7 +6207,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.6-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6773,15 +6232,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.6_toolchains//:cmake-3.20.6-linux-aarch64_toolchain", - "@cmake_3.20.6_toolchains//:cmake-3.20.6-linux-x86_64_toolchain", - "@cmake_3.20.6_toolchains//:cmake-3.20.6-macos-universal_toolchain", - "@cmake_3.20.6_toolchains//:cmake-3.20.6-windows-i386_toolchain", - "@cmake_3.20.6_toolchains//:cmake-3.20.6-windows-x86_64_toolchain", - ) - return if "3.20.5" == version: @@ -6858,7 +6308,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.5-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6883,15 +6333,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.5_toolchains//:cmake-3.20.5-linux-aarch64_toolchain", - "@cmake_3.20.5_toolchains//:cmake-3.20.5-linux-x86_64_toolchain", - "@cmake_3.20.5_toolchains//:cmake-3.20.5-macos-universal_toolchain", - "@cmake_3.20.5_toolchains//:cmake-3.20.5-windows-i386_toolchain", - "@cmake_3.20.5_toolchains//:cmake-3.20.5-windows-x86_64_toolchain", - ) - return if "3.20.4" == version: @@ -6968,7 +6409,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.4-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -6993,15 +6434,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.4_toolchains//:cmake-3.20.4-linux-aarch64_toolchain", - "@cmake_3.20.4_toolchains//:cmake-3.20.4-linux-x86_64_toolchain", - "@cmake_3.20.4_toolchains//:cmake-3.20.4-macos-universal_toolchain", - "@cmake_3.20.4_toolchains//:cmake-3.20.4-windows-i386_toolchain", - "@cmake_3.20.4_toolchains//:cmake-3.20.4-windows-x86_64_toolchain", - ) - return if "3.20.3" == version: @@ -7078,7 +6510,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.3-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7103,15 +6535,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.3_toolchains//:cmake-3.20.3-linux-aarch64_toolchain", - "@cmake_3.20.3_toolchains//:cmake-3.20.3-linux-x86_64_toolchain", - "@cmake_3.20.3_toolchains//:cmake-3.20.3-macos-universal_toolchain", - "@cmake_3.20.3_toolchains//:cmake-3.20.3-windows-i386_toolchain", - "@cmake_3.20.3_toolchains//:cmake-3.20.3-windows-x86_64_toolchain", - ) - return if "3.20.2" == version: @@ -7188,7 +6611,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.2-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7213,15 +6636,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.2_toolchains//:cmake-3.20.2-linux-aarch64_toolchain", - "@cmake_3.20.2_toolchains//:cmake-3.20.2-linux-x86_64_toolchain", - "@cmake_3.20.2_toolchains//:cmake-3.20.2-macos-universal_toolchain", - "@cmake_3.20.2_toolchains//:cmake-3.20.2-windows-i386_toolchain", - "@cmake_3.20.2_toolchains//:cmake-3.20.2-windows-x86_64_toolchain", - ) - return if "3.20.1" == version: @@ -7298,7 +6712,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.1_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.1-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7323,15 +6737,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.1_toolchains//:cmake-3.20.1-linux-aarch64_toolchain", - "@cmake_3.20.1_toolchains//:cmake-3.20.1-linux-x86_64_toolchain", - "@cmake_3.20.1_toolchains//:cmake-3.20.1-macos-universal_toolchain", - "@cmake_3.20.1_toolchains//:cmake-3.20.1-windows-i386_toolchain", - "@cmake_3.20.1_toolchains//:cmake-3.20.1-windows-x86_64_toolchain", - ) - return if "3.20.0" == version: @@ -7408,7 +6813,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.20.0_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.20.0-linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7433,15 +6838,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.20.0_toolchains//:cmake-3.20.0-linux-aarch64_toolchain", - "@cmake_3.20.0_toolchains//:cmake-3.20.0-linux-x86_64_toolchain", - "@cmake_3.20.0_toolchains//:cmake-3.20.0-macos-universal_toolchain", - "@cmake_3.20.0_toolchains//:cmake-3.20.0-windows-i386_toolchain", - "@cmake_3.20.0_toolchains//:cmake-3.20.0-windows-x86_64_toolchain", - ) - return if "3.19.8" == version: @@ -7518,7 +6914,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.19.8_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.19.8-Linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7543,15 +6939,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.19.8_toolchains//:cmake-3.19.8-Linux-aarch64_toolchain", - "@cmake_3.19.8_toolchains//:cmake-3.19.8-Linux-x86_64_toolchain", - "@cmake_3.19.8_toolchains//:cmake-3.19.8-macos-universal_toolchain", - "@cmake_3.19.8_toolchains//:cmake-3.19.8-win32-x86_toolchain", - "@cmake_3.19.8_toolchains//:cmake-3.19.8-win64-x64_toolchain", - ) - return if "3.19.7" == version: @@ -7628,7 +7015,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.19.7_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.19.7-Linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7653,15 +7040,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.19.7_toolchains//:cmake-3.19.7-Linux-aarch64_toolchain", - "@cmake_3.19.7_toolchains//:cmake-3.19.7-Linux-x86_64_toolchain", - "@cmake_3.19.7_toolchains//:cmake-3.19.7-macos-universal_toolchain", - "@cmake_3.19.7_toolchains//:cmake-3.19.7-win32-x86_toolchain", - "@cmake_3.19.7_toolchains//:cmake-3.19.7-win64-x64_toolchain", - ) - return if "3.19.6" == version: @@ -7738,7 +7116,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.19.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.19.6-Linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7763,15 +7141,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.19.6_toolchains//:cmake-3.19.6-Linux-aarch64_toolchain", - "@cmake_3.19.6_toolchains//:cmake-3.19.6-Linux-x86_64_toolchain", - "@cmake_3.19.6_toolchains//:cmake-3.19.6-macos-universal_toolchain", - "@cmake_3.19.6_toolchains//:cmake-3.19.6-win32-x86_toolchain", - "@cmake_3.19.6_toolchains//:cmake-3.19.6-win64-x64_toolchain", - ) - return if "3.19.5" == version: @@ -7848,7 +7217,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.19.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.19.5-Linux-aarch64": [ "@platforms//cpu:aarch64", @@ -7873,15 +7242,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.19.5_toolchains//:cmake-3.19.5-Linux-aarch64_toolchain", - "@cmake_3.19.5_toolchains//:cmake-3.19.5-Linux-x86_64_toolchain", - "@cmake_3.19.5_toolchains//:cmake-3.19.5-macos-universal_toolchain", - "@cmake_3.19.5_toolchains//:cmake-3.19.5-win32-x86_toolchain", - "@cmake_3.19.5_toolchains//:cmake-3.19.5-win64-x64_toolchain", - ) - return if "3.18.6" == version: @@ -7944,7 +7304,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.18.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.18.6-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -7966,14 +7326,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.18.6_toolchains//:cmake-3.18.6-Darwin-x86_64_toolchain", - "@cmake_3.18.6_toolchains//:cmake-3.18.6-Linux-x86_64_toolchain", - "@cmake_3.18.6_toolchains//:cmake-3.18.6-win32-x86_toolchain", - "@cmake_3.18.6_toolchains//:cmake-3.18.6-win64-x64_toolchain", - ) - return if "3.17.5" == version: @@ -8036,7 +7388,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.17.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.17.5-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8058,14 +7410,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.17.5_toolchains//:cmake-3.17.5-Darwin-x86_64_toolchain", - "@cmake_3.17.5_toolchains//:cmake-3.17.5-Linux-x86_64_toolchain", - "@cmake_3.17.5_toolchains//:cmake-3.17.5-win32-x86_toolchain", - "@cmake_3.17.5_toolchains//:cmake-3.17.5-win64-x64_toolchain", - ) - return if "3.16.9" == version: @@ -8128,7 +7472,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.16.9_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.16.9-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8150,14 +7494,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.16.9_toolchains//:cmake-3.16.9-Darwin-x86_64_toolchain", - "@cmake_3.16.9_toolchains//:cmake-3.16.9-Linux-x86_64_toolchain", - "@cmake_3.16.9_toolchains//:cmake-3.16.9-win32-x86_toolchain", - "@cmake_3.16.9_toolchains//:cmake-3.16.9-win64-x64_toolchain", - ) - return if "3.15.7" == version: @@ -8220,7 +7556,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.15.7_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.15.7-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8242,14 +7578,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.15.7_toolchains//:cmake-3.15.7-Darwin-x86_64_toolchain", - "@cmake_3.15.7_toolchains//:cmake-3.15.7-Linux-x86_64_toolchain", - "@cmake_3.15.7_toolchains//:cmake-3.15.7-win32-x86_toolchain", - "@cmake_3.15.7_toolchains//:cmake-3.15.7-win64-x64_toolchain", - ) - return if "3.14.7" == version: @@ -8312,7 +7640,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.14.7_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.14.7-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8334,14 +7662,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.14.7_toolchains//:cmake-3.14.7-Darwin-x86_64_toolchain", - "@cmake_3.14.7_toolchains//:cmake-3.14.7-Linux-x86_64_toolchain", - "@cmake_3.14.7_toolchains//:cmake-3.14.7-win32-x86_toolchain", - "@cmake_3.14.7_toolchains//:cmake-3.14.7-win64-x64_toolchain", - ) - return if "3.13.5" == version: @@ -8404,7 +7724,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.13.5_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.13.5-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8426,14 +7746,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.13.5_toolchains//:cmake-3.13.5-Darwin-x86_64_toolchain", - "@cmake_3.13.5_toolchains//:cmake-3.13.5-Linux-x86_64_toolchain", - "@cmake_3.13.5_toolchains//:cmake-3.13.5-win32-x86_toolchain", - "@cmake_3.13.5_toolchains//:cmake-3.13.5-win64-x64_toolchain", - ) - return if "3.12.4" == version: @@ -8496,7 +7808,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.12.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.12.4-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8518,14 +7830,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.12.4_toolchains//:cmake-3.12.4-Darwin-x86_64_toolchain", - "@cmake_3.12.4_toolchains//:cmake-3.12.4-Linux-x86_64_toolchain", - "@cmake_3.12.4_toolchains//:cmake-3.12.4-win32-x86_toolchain", - "@cmake_3.12.4_toolchains//:cmake-3.12.4-win64-x64_toolchain", - ) - return if "3.11.4" == version: @@ -8588,7 +7892,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.11.4_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.11.4-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8610,14 +7914,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.11.4_toolchains//:cmake-3.11.4-Darwin-x86_64_toolchain", - "@cmake_3.11.4_toolchains//:cmake-3.11.4-Linux-x86_64_toolchain", - "@cmake_3.11.4_toolchains//:cmake-3.11.4-win32-x86_toolchain", - "@cmake_3.11.4_toolchains//:cmake-3.11.4-win64-x64_toolchain", - ) - return if "3.10.3" == version: @@ -8680,7 +7976,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.10.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.10.3-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8702,14 +7998,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.10.3_toolchains//:cmake-3.10.3-Darwin-x86_64_toolchain", - "@cmake_3.10.3_toolchains//:cmake-3.10.3-Linux-x86_64_toolchain", - "@cmake_3.10.3_toolchains//:cmake-3.10.3-win32-x86_toolchain", - "@cmake_3.10.3_toolchains//:cmake-3.10.3-win64-x64_toolchain", - ) - return if "3.9.6" == version: @@ -8772,7 +8060,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.9.6_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.9.6-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8794,14 +8082,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.9.6_toolchains//:cmake-3.9.6-Darwin-x86_64_toolchain", - "@cmake_3.9.6_toolchains//:cmake-3.9.6-Linux-x86_64_toolchain", - "@cmake_3.9.6_toolchains//:cmake-3.9.6-win32-x86_toolchain", - "@cmake_3.9.6_toolchains//:cmake-3.9.6-win64-x64_toolchain", - ) - return if "3.8.2" == version: @@ -8864,7 +8144,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.8.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.8.2-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8886,14 +8166,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.8.2_toolchains//:cmake-3.8.2-Darwin-x86_64_toolchain", - "@cmake_3.8.2_toolchains//:cmake-3.8.2-Linux-x86_64_toolchain", - "@cmake_3.8.2_toolchains//:cmake-3.8.2-win32-x86_toolchain", - "@cmake_3.8.2_toolchains//:cmake-3.8.2-win64-x64_toolchain", - ) - return if "3.7.2" == version: @@ -8956,7 +8228,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.7.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.7.2-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -8978,14 +8250,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.7.2_toolchains//:cmake-3.7.2-Darwin-x86_64_toolchain", - "@cmake_3.7.2_toolchains//:cmake-3.7.2-Linux-x86_64_toolchain", - "@cmake_3.7.2_toolchains//:cmake-3.7.2-win32-x86_toolchain", - "@cmake_3.7.2_toolchains//:cmake-3.7.2-win64-x64_toolchain", - ) - return if "3.6.3" == version: @@ -9048,7 +8312,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.6.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.6.3-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9070,14 +8334,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.6.3_toolchains//:cmake-3.6.3-Darwin-x86_64_toolchain", - "@cmake_3.6.3_toolchains//:cmake-3.6.3-Linux-x86_64_toolchain", - "@cmake_3.6.3_toolchains//:cmake-3.6.3-win32-x86_toolchain", - "@cmake_3.6.3_toolchains//:cmake-3.6.3-win64-x64_toolchain", - ) - return if "3.5.2" == version: @@ -9126,7 +8382,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.5.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.5.2-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9144,13 +8400,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.5.2_toolchains//:cmake-3.5.2-Darwin-x86_64_toolchain", - "@cmake_3.5.2_toolchains//:cmake-3.5.2-Linux-x86_64_toolchain", - "@cmake_3.5.2_toolchains//:cmake-3.5.2-win32-x86_toolchain", - ) - return if "3.4.3" == version: @@ -9199,7 +8448,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.4.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.4.3-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9217,13 +8466,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.4.3_toolchains//:cmake-3.4.3-Darwin-x86_64_toolchain", - "@cmake_3.4.3_toolchains//:cmake-3.4.3-Linux-x86_64_toolchain", - "@cmake_3.4.3_toolchains//:cmake-3.4.3-win32-x86_toolchain", - ) - return if "3.3.2" == version: @@ -9272,7 +8514,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.3.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.3.2-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9290,13 +8532,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.3.2_toolchains//:cmake-3.3.2-Darwin-x86_64_toolchain", - "@cmake_3.3.2_toolchains//:cmake-3.3.2-Linux-x86_64_toolchain", - "@cmake_3.3.2_toolchains//:cmake-3.3.2-win32-x86_toolchain", - ) - return if "3.2.3" == version: @@ -9345,7 +8580,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.2.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.2.3-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9363,13 +8598,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.2.3_toolchains//:cmake-3.2.3-Darwin-x86_64_toolchain", - "@cmake_3.2.3_toolchains//:cmake-3.2.3-Linux-x86_64_toolchain", - "@cmake_3.2.3_toolchains//:cmake-3.2.3-win32-x86_toolchain", - ) - return if "3.1.3" == version: @@ -9418,7 +8646,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.1.3_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.1.3-Darwin-x86_64": [ "@platforms//cpu:x86_64", @@ -9436,13 +8664,6 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.1.3_toolchains//:cmake-3.1.3-Darwin-x86_64_toolchain", - "@cmake_3.1.3_toolchains//:cmake-3.1.3-Linux-x86_64_toolchain", - "@cmake_3.1.3_toolchains//:cmake-3.1.3-win32-x86_toolchain", - ) - return if "3.0.2" == version: @@ -9463,7 +8684,7 @@ def _cmake_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "cmake_3.0.2_toolchains", + name = "prebuilt_cmake_toolchains", repos = { "cmake-3.0.2-win32-x86": [ "@platforms//cpu:x86_32", @@ -9473,16 +8694,11 @@ def _cmake_toolchains(version, register_toolchains): tool = "cmake", ) - if register_toolchains: - native.register_toolchains( - "@cmake_3.0.2_toolchains//:cmake-3.0.2-win32-x86_toolchain", - ) - return fail("Unsupported version: " + str(version)) -def _ninja_toolchains(version, register_toolchains): +def ninja_toolchains(version): if "1.12.1" == version: maybe( http_archive, @@ -9557,41 +8773,32 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.12.1_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.12.1_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux", + "@platforms//os:linux" ], "ninja_1.12.1_linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux", + "@platforms//os:linux" ], "ninja_1.12.1_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos", + "@platforms//os:macos" ], "ninja_1.12.1_mac_aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:macos", + "@platforms//os:macos" ], "ninja_1.12.1_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], + "@platforms//os:windows" + ] }, tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.12.1_toolchains//:ninja_1.12.1_linux_toolchain", - "@ninja_1.12.1_toolchains//:ninja_1.12.1_linux-aarch64_toolchain", - "@ninja_1.12.1_toolchains//:ninja_1.12.1_mac_toolchain", - "@ninja_1.12.1_toolchains//:ninja_1.12.1_mac_aarch64_toolchain", - "@ninja_1.12.1_toolchains//:ninja_1.12.1_win_toolchain", - ) - return if "1.12.0" == version: @@ -9668,7 +8875,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.12.0_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.12.0_linux": [ "@platforms//cpu:x86_64", @@ -9694,15 +8901,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.12.0_toolchains//:ninja_1.12.0_linux_toolchain", - "@ninja_1.12.0_toolchains//:ninja_1.12.0_linux-aarch64_toolchain", - "@ninja_1.12.0_toolchains//:ninja_1.12.0_mac_toolchain", - "@ninja_1.12.0_toolchains//:ninja_1.12.0_mac_aarch64_toolchain", - "@ninja_1.12.0_toolchains//:ninja_1.12.0_win_toolchain", - ) - return if "1.11.1" == version: @@ -9765,7 +8963,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.11.1_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.11.1_linux": [ "@platforms//cpu:x86_64", @@ -9787,14 +8985,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.11.1_toolchains//:ninja_1.11.1_linux_toolchain", - "@ninja_1.11.1_toolchains//:ninja_1.11.1_mac_toolchain", - "@ninja_1.11.1_toolchains//:ninja_1.11.1_mac_aarch64_toolchain", - "@ninja_1.11.1_toolchains//:ninja_1.11.1_win_toolchain", - ) - return if "1.11.0" == version: @@ -9857,7 +9047,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.11.0_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.11.0_linux": [ "@platforms//cpu:x86_64", @@ -9879,14 +9069,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.11.0_toolchains//:ninja_1.11.0_linux_toolchain", - "@ninja_1.11.0_toolchains//:ninja_1.11.0_mac_toolchain", - "@ninja_1.11.0_toolchains//:ninja_1.11.0_mac_aarch64_toolchain", - "@ninja_1.11.0_toolchains//:ninja_1.11.0_win_toolchain", - ) - return if "1.10.2" == version: @@ -9949,7 +9131,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.10.2_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.10.2_linux": [ "@platforms//cpu:x86_64", @@ -9971,14 +9153,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.10.2_toolchains//:ninja_1.10.2_linux_toolchain", - "@ninja_1.10.2_toolchains//:ninja_1.10.2_mac_toolchain", - "@ninja_1.10.2_toolchains//:ninja_1.10.2_mac_aarch64_toolchain", - "@ninja_1.10.2_toolchains//:ninja_1.10.2_win_toolchain", - ) - return if "1.10.1" == version: @@ -10027,7 +9201,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.10.1_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.10.1_linux": [ "@platforms//cpu:x86_64", @@ -10045,13 +9219,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.10.1_toolchains//:ninja_1.10.1_linux_toolchain", - "@ninja_1.10.1_toolchains//:ninja_1.10.1_mac_toolchain", - "@ninja_1.10.1_toolchains//:ninja_1.10.1_win_toolchain", - ) - return if "1.10.0" == version: @@ -10100,7 +9267,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.10.0_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.10.0_linux": [ "@platforms//cpu:x86_64", @@ -10118,13 +9285,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.10.0_toolchains//:ninja_1.10.0_linux_toolchain", - "@ninja_1.10.0_toolchains//:ninja_1.10.0_mac_toolchain", - "@ninja_1.10.0_toolchains//:ninja_1.10.0_win_toolchain", - ) - return if "1.9.0" == version: @@ -10173,7 +9333,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.9.0_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.9.0_linux": [ "@platforms//cpu:x86_64", @@ -10191,13 +9351,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.9.0_toolchains//:ninja_1.9.0_linux_toolchain", - "@ninja_1.9.0_toolchains//:ninja_1.9.0_mac_toolchain", - "@ninja_1.9.0_toolchains//:ninja_1.9.0_win_toolchain", - ) - return if "1.8.2" == version: @@ -10246,7 +9399,7 @@ def _ninja_toolchains(version, register_toolchains): # buildifier: leave-alone maybe( prebuilt_toolchains_repository, - name = "ninja_1.8.2_toolchains", + name = "prebuilt_ninja_toolchains", repos = { "ninja_1.8.2_linux": [ "@platforms//cpu:x86_64", @@ -10264,13 +9417,6 @@ def _ninja_toolchains(version, register_toolchains): tool = "ninja", ) - if register_toolchains: - native.register_toolchains( - "@ninja_1.8.2_toolchains//:ninja_1.8.2_linux_toolchain", - "@ninja_1.8.2_toolchains//:ninja_1.8.2_mac_toolchain", - "@ninja_1.8.2_toolchains//:ninja_1.8.2_win_toolchain", - ) - return fail("Unsupported version: " + str(version)) diff --git a/toolchains/prebuilt_toolchains.py b/toolchains/prebuilt_toolchains.py index c9a7889d..f1b9bc34 100755 --- a/toolchains/prebuilt_toolchains.py +++ b/toolchains/prebuilt_toolchains.py @@ -209,13 +209,6 @@ maybe( ) """ -REGISTER_TOOLCHAINS = """\ -if register_toolchains: - native.register_toolchains( -{toolchains} - ) -""" - BZL_FILE_TEMPLATE = """\ \"\"\" A U T O G E N E R A T E D -- D O N O T M O D I F Y @generated @@ -281,21 +274,20 @@ native_tool_toolchain( \"\"\" # buildifier: disable=unnamed-macro -def prebuilt_toolchains(cmake_version, ninja_version, register_toolchains): +def prebuilt_toolchains(cmake_version, ninja_version): \"\"\"Register toolchains for pre-built cmake and ninja binaries Args: cmake_version (string): The target cmake version ninja_version (string): The target ninja-build version - register_toolchains (boolean): Whether to call native.register_toolchains or not \"\"\" - _cmake_toolchains(cmake_version, register_toolchains) - _ninja_toolchains(ninja_version, register_toolchains) + cmake_toolchains(cmake_version) + ninja_toolchains(ninja_version) -def _cmake_toolchains(version, register_toolchains): +def cmake_toolchains(version): {cmake_definitions} -def _ninja_toolchains(version, register_toolchains): +def ninja_toolchains(version): {ninja_definitions} """ @@ -314,7 +306,7 @@ def get_cmake_definitions() -> str: """Define a set of repositories and calls for registering `cmake` toolchains Returns: - str: The Implementation of `_cmake_toolchains` + str: The Implementation of `cmake_toolchains` """ archives = [] @@ -388,7 +380,7 @@ def get_cmake_definitions() -> str: archives.append( indent( TOOLCHAIN_REPO_DEFINITION.format( - name="cmake_{}_toolchains".format(version), + name="prebuilt_cmake_toolchains", repos=indent( json.dumps(toolchains_repos, indent=4), " " * 4 ).lstrip(), @@ -398,25 +390,6 @@ def get_cmake_definitions() -> str: ) ) - archives.append( - indent( - REGISTER_TOOLCHAINS.format( - toolchains="\n".join( - [ - indent( - '"@cmake_{}_toolchains//:{}_toolchain",'.format( - version, repo - ), - " " * 8, - ) - for repo in toolchains_repos - ] - ) - ), - " " * 8, - ) - ) - archives.extend( [ indent("return", " " * 8), @@ -433,7 +406,7 @@ def get_ninja_definitions() -> str: """Define a set of repositories and calls for registering `ninja` toolchains Returns: - str: The Implementation of `_ninja_toolchains` + str: The Implementation of `ninja_toolchains` """ archives = [] @@ -506,7 +479,7 @@ def get_ninja_definitions() -> str: archives.append( indent( TOOLCHAIN_REPO_DEFINITION.format( - name="ninja_{}_toolchains".format(version), + name="prebuilt_ninja_toolchains", repos=indent( json.dumps(toolchains_repos, indent=4), " " * 4 ).lstrip(), @@ -516,25 +489,6 @@ def get_ninja_definitions() -> str: ) ) - archives.append( - indent( - REGISTER_TOOLCHAINS.format( - toolchains="\n".join( - [ - indent( - '"@ninja_{}_toolchains//:{}_toolchain",'.format( - version, repo - ), - " " * 8, - ) - for repo in toolchains_repos - ] - ) - ), - " " * 8, - ) - ) - archives.extend( [ indent("return", " " * 8), diff --git a/toolchains/private/BUILD.bazel b/toolchains/private/BUILD.bazel index 4ccdeefb..22bfa66a 100644 --- a/toolchains/private/BUILD.bazel +++ b/toolchains/private/BUILD.bazel @@ -1,14 +1,13 @@ -load("//foreign_cc/built_tools:cmake_build.bzl", "cmake_tool") -load("//foreign_cc/built_tools:make_build.bzl", "make_tool") -load("//foreign_cc/built_tools:meson_build.bzl", "meson_tool") -load("//foreign_cc/built_tools:ninja_build.bzl", "ninja_tool") -load("//foreign_cc/built_tools:pkgconfig_build.bzl", "pkgconfig_tool") load("//toolchains/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain") package(default_visibility = ["//visibility:public"]) native_tool_toolchain( name = "preinstalled_make", + env = select({ + "@platforms//os:windows": {"MAKE": "make.exe"}, + "//conditions:default": {"MAKE": "make"}, + }), path = select({ "@platforms//os:windows": "make.exe", "//conditions:default": "make", @@ -20,25 +19,6 @@ native_tool_toolchain( path = "nmake.exe", ) -make_tool( - name = "make_tool", - srcs = "@gnumake_src//:all_srcs", - tags = ["manual"], -) - -native_tool_toolchain( - name = "built_make", - env = select({ - "@platforms//os:windows": {"MAKE": "$(execpath :make_tool)/bin/make.exe"}, - "//conditions:default": {"MAKE": "$(execpath :make_tool)/bin/make"}, - }), - path = select({ - "@platforms//os:windows": "$(execpath :make_tool)/bin/make.exe", - "//conditions:default": "$(execpath :make_tool)/bin/make", - }), - target = ":make_tool", -) - native_tool_toolchain( name = "preinstalled_cmake", env = select({ @@ -51,25 +31,6 @@ native_tool_toolchain( }), ) -cmake_tool( - name = "cmake_tool", - srcs = "@cmake_src//:all_srcs", - tags = ["manual"], -) - -native_tool_toolchain( - name = "built_cmake", - env = select({ - "@platforms//os:windows": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake.exe"}, - "//conditions:default": {"CMAKE": "$(execpath :cmake_tool)/bin/cmake"}, - }), - path = select({ - "@platforms//os:windows": "$(execpath :cmake_tool)/bin/cmake.exe", - "//conditions:default": "$(execpath :cmake_tool)/bin/cmake", - }), - target = ":cmake_tool", -) - native_tool_toolchain( name = "preinstalled_ninja", env = select({ @@ -82,25 +43,6 @@ native_tool_toolchain( }), ) -ninja_tool( - name = "ninja_tool", - srcs = "@ninja_build_src//:all_srcs", - tags = ["manual"], -) - -native_tool_toolchain( - name = "built_ninja", - env = select({ - "@platforms//os:windows": {"NINJA": "$(execpath :ninja_tool)/bin/ninja.exe"}, - "//conditions:default": {"NINJA": "$(execpath :ninja_tool)/bin/ninja"}, - }), - path = select({ - "@platforms//os:windows": "$(execpath :ninja_tool)/bin/ninja.exe", - "//conditions:default": "$(execpath :ninja_tool)/bin/ninja", - }), - target = ":ninja_tool", -) - native_tool_toolchain( name = "preinstalled_meson", path = select({ @@ -109,20 +51,6 @@ native_tool_toolchain( }), ) -meson_tool( - name = "meson_tool", - data = ["@meson_src//:runtime"], - main = "@meson_src//:meson.py", - tags = ["manual"], -) - -native_tool_toolchain( - name = "built_meson", - env = {"MESON": "$(execpath :meson_tool)"}, - path = "$(execpath :meson_tool)", - target = ":meson_tool", -) - native_tool_toolchain( name = "preinstalled_autoconf", path = select({ @@ -154,22 +82,3 @@ native_tool_toolchain( "//conditions:default": "pkg-config", }), ) - -pkgconfig_tool( - name = "pkgconfig_tool", - srcs = "@pkgconfig_src//:all_srcs", - tags = ["manual"], -) - -native_tool_toolchain( - name = "built_pkgconfig", - env = select({ - "@platforms//os:windows": {"PKG_CONFIG": "$(execpath :pkgconfig_tool)"}, - "//conditions:default": {"PKG_CONFIG": "$(execpath :pkgconfig_tool)/bin/pkg-config"}, - }), - path = select({ - "@platforms//os:windows": "$(execpath :pkgconfig_tool)", - "//conditions:default": "$(execpath :pkgconfig_tool)/bin/pkg-config", - }), - target = ":pkgconfig_tool", -)