blob: a712f2ea50f5f11c3ede9556a10cf0a411f38ebf [file] [log] [blame] [edit]
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//nodejs/private:toolchains_repo.bzl", "PLATFORMS")
filegroup(
name = "package_contents",
srcs = glob(["*"]) + [
"//nodejs/private:package_contents",
],
visibility = ["//:__pkg__"],
)
bzl_library(
name = "bzl",
srcs = glob(["*.bzl"]) + ["@bazel_tools//tools:bzl_srcs"],
visibility = ["//visibility:public"],
deps = [
"//nodejs/private:bzl",
"//nodejs/private/providers:bzl",
"//third_party/github.com/bazelbuild/bazel-skylib:bzl",
],
)
# This is the target rule authors should put in their "toolchains"
# attribute in order to get a node interpreter for the correct
# platform.
# See https://docs.bazel.build/versions/main/toolchains.html#writing-rules-that-use-toolchains
toolchain_type(
name = "toolchain_type",
visibility = ["//visibility:public"],
)
[
platform(
name = key,
constraint_values = values.compatible_with,
)
for key, values in PLATFORMS.items()
]
[
config_setting(
name = "is_%s" % key,
constraint_values = values.compatible_with,
)
for key, values in PLATFORMS.items()
]