2021-04-10 01:05:01 +03:00
|
|
|
workspace(
|
2021-06-11 06:43:15 +03:00
|
|
|
name = "bazel-zig-cc",
|
2021-04-10 01:05:01 +03:00
|
|
|
)
|
|
|
|
|
2021-06-07 22:50:19 +03:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2021-06-07 22:24:26 +03:00
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_go",
|
2022-05-17 14:43:40 +03:00
|
|
|
sha256 = "ab21448cef298740765f33a7f5acee0607203e4ea321219f2a4c85a6e0fb0a27",
|
2021-06-07 22:24:26 +03:00
|
|
|
urls = [
|
2022-05-17 14:43:40 +03:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip",
|
|
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip",
|
2021-06-07 22:24:26 +03:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "bazel_gazelle",
|
2022-05-17 14:43:40 +03:00
|
|
|
sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
|
2021-06-07 22:24:26 +03:00
|
|
|
urls = [
|
2022-05-17 14:43:40 +03:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
|
2021-06-07 22:24:26 +03:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2022-02-24 11:03:11 +02:00
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies")
|
2021-06-07 22:40:51 +03:00
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
2021-06-07 22:24:26 +03:00
|
|
|
|
|
|
|
go_rules_dependencies()
|
|
|
|
|
2022-02-24 11:03:11 +02:00
|
|
|
# use latest stable.
|
2022-03-26 16:05:22 +02:00
|
|
|
go_download_sdk(
|
|
|
|
name = "go_sdk",
|
2022-06-08 11:55:07 +03:00
|
|
|
version = "1.18.3",
|
2022-03-26 16:05:22 +02:00
|
|
|
)
|
2022-02-24 11:03:11 +02:00
|
|
|
|
|
|
|
go_register_toolchains()
|
2021-06-07 22:24:26 +03:00
|
|
|
|
2021-07-21 14:59:33 +03:00
|
|
|
load("//:repositories.bzl", "go_repositories")
|
|
|
|
|
|
|
|
# gazelle:repository_macro repositories.bzl%go_repositories
|
|
|
|
go_repositories()
|
|
|
|
|
2021-06-07 22:50:19 +03:00
|
|
|
gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE")
|
|
|
|
|
2021-06-10 13:12:54 +03:00
|
|
|
load(
|
|
|
|
"//toolchain:defs.bzl",
|
2022-04-13 17:52:25 +03:00
|
|
|
zig_toolchains = "toolchains",
|
2021-04-10 01:05:01 +03:00
|
|
|
)
|
|
|
|
|
2022-04-13 17:52:25 +03:00
|
|
|
zig_toolchains()
|
|
|
|
|
|
|
|
register_toolchains(
|
2022-04-18 12:17:03 +03:00
|
|
|
# if no `--platform` is specified, these toolchains will be used for
|
2022-05-29 19:35:18 +03:00
|
|
|
# (linux,darwin,windows)x(amd64,arm64)
|
2022-04-13 17:52:25 +03:00
|
|
|
"@zig_sdk//toolchain:linux_amd64_gnu.2.19",
|
|
|
|
"@zig_sdk//toolchain:linux_arm64_gnu.2.28",
|
|
|
|
"@zig_sdk//toolchain:darwin_amd64",
|
|
|
|
"@zig_sdk//toolchain:darwin_arm64",
|
2022-05-29 19:35:18 +03:00
|
|
|
"@zig_sdk//toolchain:windows_amd64",
|
|
|
|
"@zig_sdk//toolchain:windows_arm64",
|
2022-04-15 15:20:42 +03:00
|
|
|
|
2022-04-18 12:17:03 +03:00
|
|
|
# amd64 toolchains for libc-aware platforms:
|
2022-04-15 15:20:42 +03:00
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.19",
|
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.28",
|
2022-04-18 12:17:03 +03:00
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.31",
|
2022-04-15 15:20:42 +03:00
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_amd64_musl",
|
2022-04-18 12:17:03 +03:00
|
|
|
# arm64 toolchains for libc-aware platforms:
|
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.28",
|
|
|
|
"@zig_sdk//libc_aware/toolchain:linux_arm64_musl",
|
2022-04-13 17:52:25 +03:00
|
|
|
)
|