test-zig-cc/WORKSPACE
Motiejus Jakštys 06d0014016 More data.
The truth is somewhere between absolute paths, relative paths, and
sandbox size.

Will probably investigate more when #13050 and #13160 are resolved.
2022-10-26 00:00:18 +03:00

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 = "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(
host_platform_sha256 = {
"linux-x86_64": "c617ac061307c48903caae4b4cab5e919f92fce27f369fa4b6acea123b0f3c22",
},
url_formats = [
"https://dl.jakstys.lt/zig/zig-{host_platform}-{version}.{_ext}",
],
version = "0.10.0-dev.4561+uber1",
)
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",
)