66 lines
2.1 KiB
Python
66 lines
2.1 KiB
Python
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 = "88e7e47ed20ca7b2f9509dfe09089b812d7d94eb"
|
|
|
|
http_archive(
|
|
name = "bazel-zig-cc",
|
|
sha256 = "2a9dd119243899041279b61066a98b53d6859e168f7fc3be0cc9532fa329fc68",
|
|
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(
|
|
host_platform_sha256 = {
|
|
"linux-x86_64": "39d466cc8da7dd74a99318b28286d34f8b07465538be747441e5604449f2d92f",
|
|
},
|
|
url_formats = [
|
|
"https://dl.jakstys.lt/zig/zig-{host_platform}-{version}.{_ext}",
|
|
],
|
|
version = "0.11.0-dev.230+a8c06b2ce",
|
|
)
|
|
|
|
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",
|
|
)
|