151 lines
3.4 KiB
Python
151 lines
3.4 KiB
Python
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
|
|
load(":toolchain.bzl", "bun_toolchain")
|
|
load(":version.bzl", "BUN_VERSION")
|
|
|
|
exports_files([
|
|
"defs.bzl",
|
|
"extensions.bzl",
|
|
"repositories.bzl",
|
|
"toolchain.bzl",
|
|
"version.bzl",
|
|
])
|
|
|
|
bzl_library(
|
|
name = "toolchain_bzl",
|
|
srcs = ["toolchain.bzl"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
bzl_library(
|
|
name = "extensions_bzl",
|
|
srcs = ["extensions.bzl"],
|
|
visibility = ["//visibility:public"],
|
|
deps = ["//internal:bun_install_bzl"],
|
|
)
|
|
|
|
bzl_library(
|
|
name = "repositories_bzl",
|
|
srcs = ["repositories.bzl"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
bzl_library(
|
|
name = "defs_bzl",
|
|
srcs = ["defs.bzl"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":toolchain_bzl",
|
|
"//internal:bun_build_support_bzl",
|
|
"//internal:bun_binary_bzl",
|
|
"//internal:bun_compile_bzl",
|
|
"//internal:bun_bundle_bzl",
|
|
"//internal:bun_dev_bzl",
|
|
"//internal:bun_script_bzl",
|
|
"//internal:bun_test_bzl",
|
|
"//internal:js_compat_bzl",
|
|
"//internal:js_library_bzl",
|
|
],
|
|
)
|
|
|
|
toolchain_type(name = "toolchain_type")
|
|
|
|
bun_toolchain(
|
|
name = "linux_x64_toolchain_impl",
|
|
bun = "@bun_linux_x64//:bun",
|
|
version = BUN_VERSION,
|
|
)
|
|
|
|
bun_toolchain(
|
|
name = "linux_aarch64_toolchain_impl",
|
|
bun = "@bun_linux_aarch64//:bun",
|
|
version = BUN_VERSION,
|
|
)
|
|
|
|
bun_toolchain(
|
|
name = "darwin_x64_toolchain_impl",
|
|
bun = "@bun_darwin_x64//:bun",
|
|
version = BUN_VERSION,
|
|
)
|
|
|
|
bun_toolchain(
|
|
name = "darwin_aarch64_toolchain_impl",
|
|
bun = "@bun_darwin_aarch64//:bun",
|
|
version = BUN_VERSION,
|
|
)
|
|
|
|
bun_toolchain(
|
|
name = "windows_x64_toolchain_impl",
|
|
bun = "@bun_windows_x64//:bun",
|
|
version = BUN_VERSION,
|
|
)
|
|
|
|
toolchain(
|
|
name = "linux_x64_toolchain",
|
|
exec_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:linux",
|
|
],
|
|
target_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:linux",
|
|
],
|
|
toolchain = ":linux_x64_toolchain_impl",
|
|
toolchain_type = ":toolchain_type",
|
|
)
|
|
|
|
toolchain(
|
|
name = "linux_aarch64_toolchain",
|
|
exec_compatible_with = [
|
|
"@platforms//cpu:arm64",
|
|
"@platforms//os:linux",
|
|
],
|
|
target_compatible_with = [
|
|
"@platforms//cpu:arm64",
|
|
"@platforms//os:linux",
|
|
],
|
|
toolchain = ":linux_aarch64_toolchain_impl",
|
|
toolchain_type = ":toolchain_type",
|
|
)
|
|
|
|
toolchain(
|
|
name = "darwin_x64_toolchain",
|
|
exec_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:macos",
|
|
],
|
|
target_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:macos",
|
|
],
|
|
toolchain = ":darwin_x64_toolchain_impl",
|
|
toolchain_type = ":toolchain_type",
|
|
)
|
|
|
|
toolchain(
|
|
name = "darwin_aarch64_toolchain",
|
|
exec_compatible_with = [
|
|
"@platforms//cpu:arm64",
|
|
"@platforms//os:macos",
|
|
],
|
|
target_compatible_with = [
|
|
"@platforms//cpu:arm64",
|
|
"@platforms//os:macos",
|
|
],
|
|
toolchain = ":darwin_aarch64_toolchain_impl",
|
|
toolchain_type = ":toolchain_type",
|
|
)
|
|
|
|
toolchain(
|
|
name = "windows_x64_toolchain",
|
|
exec_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:windows",
|
|
],
|
|
target_compatible_with = [
|
|
"@platforms//cpu:x86_64",
|
|
"@platforms//os:windows",
|
|
],
|
|
toolchain = ":windows_x64_toolchain_impl",
|
|
toolchain_type = ":toolchain_type",
|
|
)
|