mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-30 16:42:07 +00:00
99ea1b09fc
* Extract cmake and ninja into a toolchain; provide defaults. In the workspace-level rule registration function, default toolchain implementations are registered for all platforms, which are calling the cmake and ninja just by name, assuming they are preinstalled. Also, the user can pass the custom toolchains in the initialization function, they will be registered before the defaults. * Do not run ninja build test for now without nested workspaces support * Corrections after merge * Always build ninja from sources for tests, correct initialization order * Add example of using prebuilt artefact in the native tools toolchain. * Review comments, have native_tool_toolchain#target, not label + improve documentation * Correct ninja toolchain label * Correct documentation in native_tools_toolchain.bzl
20 lines
375 B
Python
20 lines
375 B
Python
load("@rules_foreign_cc//for_workspace:ninja_build.bzl", "ninja_tool")
|
|
|
|
ninja_tool(
|
|
name = "ninja_tool",
|
|
ninja_srcs = "@ninja_build//:all",
|
|
)
|
|
|
|
sh_library(
|
|
name = "ninja_",
|
|
srcs = [":ninja_tool"],
|
|
)
|
|
|
|
sh_test(
|
|
name = "test_ninja_version",
|
|
srcs = ["test_ninja_version.sh"],
|
|
args = ["true"],
|
|
visibility = ["//:__pkg__"],
|
|
deps = [":ninja_"],
|
|
)
|