load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") ## LLVM-14 BAZEL_TOOLCHAIN_TAG = "0.7.2" BAZEL_TOOLCHAIN_SHA = "f7aa8e59c9d3cafde6edb372d9bd25fb4ee7293ab20b916d867cd0baaa642529" http_archive( name = "com_grail_bazel_toolchain", sha256 = BAZEL_TOOLCHAIN_SHA, strip_prefix = "bazel-toolchain-{tag}".format(tag = BAZEL_TOOLCHAIN_TAG), canonical_id = BAZEL_TOOLCHAIN_TAG, url = "https://github.com/grailbio/bazel-toolchain/archive/{tag}.tar.gz".format(tag = BAZEL_TOOLCHAIN_TAG), ) load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") bazel_toolchain_dependencies() load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") llvm_toolchain( name = "llvm_toolchain", llvm_version = "14.0.0", ) load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") #llvm_register_toolchains() ### ZIG BAZEL_ZIG_CC_VERSION = "ae2746ebebc4e8d5c9d9638f0d1f858708002681" http_archive( name = "bazel-zig-cc", sha256 = "0f50bb8e130429ccae3017ba3274dd276ac744474b426f72df86a4a4a8c66ca0", strip_prefix = "bazel-zig-cc-{}".format(BAZEL_ZIG_CC_VERSION), urls = [ "https://git.sr.ht/~motiejus/bazel-zig-cc/archive/{}.tar.gz".format(BAZEL_ZIG_CC_VERSION), ], ) load("@bazel-zig-cc//toolchain:defs.bzl", zig_toolchains = "toolchains") zig_toolchains() register_toolchains( # amd64 toolchains for libc-aware platforms: "@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.19", "@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.28", "@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.31", "@zig_sdk//libc_aware/toolchain:linux_amd64_musl", # arm64 toolchains for libc-aware platforms: "@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.28", "@zig_sdk//libc_aware/toolchain:linux_arm64_musl", )