1
hermetic_cc_toolchain/WORKSPACE

95 lines
3.0 KiB
Python
Raw Normal View History

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
)
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",
2023-02-10 15:44:56 +02:00
sha256 = "dd926a88a564a9246713a9c00b35315f54cbd46b31a26d5d8fb264c07045f05d",
2021-06-07 22:24:26 +03:00
urls = [
2023-02-10 15:44:56 +02:00
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.38.1/rules_go-v0.38.1.zip",
2021-06-07 22:24:26 +03:00
],
)
http_archive(
name = "bazel_gazelle",
sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d",
2021-06-07 22:24:26 +03:00
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz",
2021-06-07 22:24:26 +03: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()
# use latest stable.
2022-03-26 16:05:22 +02:00
go_download_sdk(
name = "go_sdk",
2023-02-10 15:44:56 +02:00
version = "1.20",
2022-03-26 16:05:22 +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()
gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE")
2021-06-10 13:12:54 +03:00
load(
"//toolchain:defs.bzl",
zig_toolchains = "toolchains",
2021-04-10 01:05:01 +03:00
)
zig_toolchains()
register_toolchains(
# 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)
"@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
# 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",
"@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",
# arm64 toolchains for libc-aware platforms:
"@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.28",
"@zig_sdk//libc_aware/toolchain:linux_arm64_musl",
)
2023-02-20 07:48:09 +02:00
http_archive(
name = "com_google_protobuf",
sha256 = "d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113",
strip_prefix = "protobuf-3.14.0",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
releaser This is a work in progress. Next steps: 1. Add instructions to the wiki. 2. Try the new tarball on a real repository. 3. Cut the actual release. Test output for an upcoming `v1.0.2`: $ bazel run //tools/releaser -- -skip_upgrades=true -tag v1.0.2 INFO: Analyzed target //tools/releaser:releaser (1 packages loaded, 29 targets configured). INFO: Found 1 target... Target //tools/releaser:releaser up-to-date: bazel-bin/tools/releaser/releaser_/releaser INFO: Elapsed time: 1.978s, Critical Path: 1.81s INFO: 3 processes: 1 internal, 2 linux-sandbox. INFO: Build completed successfully, 3 total actions INFO: Running command line: bazel-bin/tools/releaser/releaser_/releaser '-skip_upgrades=true' -tag v1.0.2 Running pre-release checks: - SKIPPING: go update commands - gazelle - checking if repository is clean Creating tag v1.0.2 Creating archive bazel-zig-cc-v1.0.2.tar Compressing bazel-zig-cc-v1.0.2.tar Written /code/bazel-zig-cc/bazel-zig-cc-v1.0.2.tar.gz Release boilerplate: ----- load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel-zig-cc", sha256 = "b0e857f8b32062a112305931437c5a7e1762287e27379c6d2d7173f0fa74e270", urls = [ "https://mirror.bazel.build/github.com/uber/bazel-zig-cc/releases/download/v1.0.2/bazel-zig-cc-v1.0.2.tar.gz", "https://github.com/uber/bazel-zig-cc/releases/download/v1.0.2/bazel-zig-cc-v1.0.2.tar.gz", ], ) load("@bazel-zig-cc//toolchain:defs.bzl", zig_toolchains = "toolchains") # Argument-free will pick reasonable defaults. zig_toolchains() # version, url_formats and host_platform_sha256 are can be set for those who # wish to control their Zig SDK version and where it is downloaded from zig_toolchains( version = "<...>", url_formats = [ "https://example.org/zig/zig-{host_platform}-{version}.{_ext}", ], host_platform_sha256 = { ... }, )
2023-03-10 10:45:02 +02:00
ZOPFLI_COMMIT = "831773bc28e318b91a3255fa12c9fcde1606058b"
http_archive(
name = "zopfli",
build_file = "//:third_party/BUILD.zopfli",
sha256 = "dbc695ae30c815973dc38b39e2f95dc2b249263b7222427d96e5e785092b0f78",
strip_prefix = "zopfli-{}".format(ZOPFLI_COMMIT),
urls = ["https://github.com/google/zopfli/archive/{}.tar.gz".format(ZOPFLI_COMMIT)],
)