2021-02-16 15:41:58 +00:00
|
|
|
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
|
2023-06-09 10:29:12 +00:00
|
|
|
load("//toolchains:toolchains.bzl", "current_autoconf_toolchain", "current_automake_toolchain", "current_cmake_toolchain", "current_m4_toolchain", "current_make_toolchain", "current_meson_toolchain", "current_ninja_toolchain", "current_pkgconfig_toolchain")
|
2021-03-11 16:52:36 +00:00
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "cmake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "ninja_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "make_toolchain",
|
|
|
|
)
|
|
|
|
|
2023-06-09 10:29:12 +00:00
|
|
|
toolchain_type(
|
|
|
|
name = "meson_toolchain",
|
|
|
|
)
|
|
|
|
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain_type(
|
|
|
|
name = "pkgconfig_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "m4_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "autoconf_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain_type(
|
|
|
|
name = "automake_toolchain",
|
|
|
|
)
|
|
|
|
|
2022-03-14 14:06:22 +00:00
|
|
|
current_cmake_toolchain(
|
|
|
|
name = "current_cmake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
current_ninja_toolchain(
|
|
|
|
name = "current_ninja_toolchain",
|
|
|
|
)
|
|
|
|
|
2023-06-09 10:29:12 +00:00
|
|
|
current_meson_toolchain(
|
|
|
|
name = "current_meson_toolchain",
|
|
|
|
)
|
|
|
|
|
2022-03-14 14:06:22 +00:00
|
|
|
current_m4_toolchain(
|
|
|
|
name = "current_m4_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
current_pkgconfig_toolchain(
|
|
|
|
name = "current_pkgconfig_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
current_make_toolchain(
|
|
|
|
name = "current_make_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
current_automake_toolchain(
|
|
|
|
name = "current_automake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
current_autoconf_toolchain(
|
|
|
|
name = "current_autoconf_toolchain",
|
|
|
|
)
|
|
|
|
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain(
|
|
|
|
name = "built_cmake_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:built_cmake",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":cmake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "built_ninja_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:built_ninja",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":ninja_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "built_make_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:built_make",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":make_toolchain",
|
|
|
|
)
|
|
|
|
|
2023-06-09 10:29:12 +00:00
|
|
|
toolchain(
|
|
|
|
name = "built_meson_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:built_meson",
|
2023-06-09 10:29:12 +00:00
|
|
|
toolchain_type = ":meson_toolchain",
|
|
|
|
)
|
|
|
|
|
2022-11-09 11:54:39 +00:00
|
|
|
toolchain(
|
|
|
|
name = "built_pkgconfig_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:built_pkgconfig",
|
2022-11-09 11:54:39 +00:00
|
|
|
toolchain_type = ":pkgconfig_toolchain",
|
|
|
|
)
|
|
|
|
|
2021-03-11 16:52:36 +00:00
|
|
|
# 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(
|
|
|
|
name = "preinstalled_cmake_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_cmake",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":cmake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
# Preinstalled ninja 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(
|
|
|
|
name = "preinstalled_ninja_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_ninja",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":ninja_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
# Preinstalled make 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(
|
|
|
|
name = "preinstalled_make_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_make",
|
2021-03-11 16:52:36 +00:00
|
|
|
toolchain_type = ":make_toolchain",
|
|
|
|
)
|
2021-02-16 15:41:58 +00:00
|
|
|
|
2021-07-18 19:46:46 +00:00
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_nmake_toolchain",
|
|
|
|
exec_compatible_with = [
|
|
|
|
"@platforms//os:windows",
|
|
|
|
],
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_nmake",
|
2021-07-18 19:46:46 +00:00
|
|
|
toolchain_type = ":make_toolchain",
|
|
|
|
)
|
|
|
|
|
2023-06-09 10:29:12 +00:00
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_meson_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_meson",
|
2023-06-09 10:29:12 +00:00
|
|
|
toolchain_type = ":meson_toolchain",
|
|
|
|
)
|
|
|
|
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_autoconf_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_autoconf",
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain_type = ":autoconf_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_automake_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_automake",
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain_type = ":automake_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_m4_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_m4",
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain_type = ":m4_toolchain",
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "preinstalled_pkgconfig_toolchain",
|
2024-01-12 22:00:28 +00:00
|
|
|
toolchain = "//toolchains/private:preinstalled_pkgconfig",
|
2021-12-17 23:27:10 +00:00
|
|
|
toolchain_type = ":pkgconfig_toolchain",
|
|
|
|
)
|
|
|
|
|
2021-02-16 15:41:58 +00:00
|
|
|
bzl_library(
|
2023-12-21 10:42:09 +00:00
|
|
|
name = "built_toolchains",
|
|
|
|
srcs = ["built_toolchains.bzl"],
|
2021-03-11 16:52:36 +00:00
|
|
|
deps = [
|
2023-12-21 10:42:09 +00:00
|
|
|
"@bazel_tools//tools/build_defs/repo:http.bzl",
|
|
|
|
"@bazel_tools//tools/build_defs/repo:utils.bzl",
|
|
|
|
"@rules_foreign_cc//toolchains:cmake_versions",
|
2021-03-11 16:52:36 +00:00
|
|
|
],
|
2021-02-16 15:41:58 +00:00
|
|
|
)
|
2023-12-21 10:42:09 +00:00
|
|
|
|
|
|
|
bzl_library(
|
|
|
|
name = "prebuilt_toolchains",
|
|
|
|
srcs = ["prebuilt_toolchains.bzl"],
|
|
|
|
deps = [
|
|
|
|
"@bazel_tools//tools/build_defs/repo:http.bzl",
|
|
|
|
"@bazel_tools//tools/build_defs/repo:utils.bzl",
|
|
|
|
"@rules_foreign_cc//toolchains:prebuilt_toolchains_repository",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
bzl_library(
|
|
|
|
name = "toolchains",
|
|
|
|
srcs = ["toolchains.bzl"],
|
|
|
|
deps = [
|
|
|
|
":built_toolchains",
|
|
|
|
":prebuilt_toolchains",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
bzl_library(
|
|
|
|
name = "cmake_versions",
|
|
|
|
srcs = ["cmake_versions.bzl"],
|
|
|
|
)
|
|
|
|
|
|
|
|
bzl_library(
|
|
|
|
name = "prebuilt_toolchains_repository",
|
|
|
|
srcs = ["prebuilt_toolchains_repository.bzl"],
|
|
|
|
)
|