2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-30 16:42:07 +00:00
rules_foreign_cc/toolchains/BUILD.bazel
UebelAndre 689c96aaa7
Fetch prebuilt cmake and ninja binaries as registered default toolchains (#508)
* Added tooling for generating repositories for pre-built cmake and ninja binaries

* Generated toolchains

* Picked up fix

* Removed toolchains from http_archives and updated generator script

* Regenerated toolchains

* Updated cmake version

* Added additional constraints

* Added option for registering preinstalled toolchains

* MacOS uses universal binaries

* Fixed typo

* More constraints
2021-02-16 15:41:58 +00:00

69 lines
1.5 KiB
Python

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//for_workspace:cmake_build.bzl", "cmake_tool")
load("//for_workspace:make_build.bzl", "make_tool")
load("//for_workspace:ninja_build.bzl", "ninja_tool")
load("//tools/build_defs/native_tools:native_tools_toolchain.bzl", "native_tool_toolchain")
native_tool_toolchain(
name = "preinstalled_make",
path = "make",
visibility = ["//visibility:public"],
)
make_tool(
name = "make_tool",
make_srcs = "@make//:all",
tags = ["manual"],
)
native_tool_toolchain(
name = "built_make",
path = "make/bin/make",
target = ":make_tool",
visibility = ["//visibility:public"],
)
native_tool_toolchain(
name = "preinstalled_cmake",
path = "cmake",
visibility = ["//visibility:public"],
)
cmake_tool(
name = "cmake_tool",
cmake_srcs = "@cmake//:all",
tags = ["manual"],
)
native_tool_toolchain(
name = "built_cmake",
path = "cmake/bin/cmake",
target = ":cmake_tool",
visibility = ["//visibility:public"],
)
native_tool_toolchain(
name = "preinstalled_ninja",
path = "ninja",
visibility = ["//visibility:public"],
)
ninja_tool(
name = "ninja_tool",
ninja_srcs = "@ninja_build//:all",
tags = ["manual"],
)
native_tool_toolchain(
name = "built_ninja",
path = "ninja/ninja",
target = ":ninja_tool",
visibility = ["//visibility:public"],
)
bzl_library(
name = "bzl_srcs",
srcs = glob(["**/*.bzl"]),
visibility = ["//visibility:public"],
)