From 4bd7b30f65f8956a12050ba9d96cc3cdc3951ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 10 Jun 2021 09:34:59 +0300 Subject: [PATCH] change @com_github_ziglang_zig to @zig_sdk --- .build.yml | 6 +++--- README.md | 6 +++--- test/BUILD | 2 +- toolchain/defs.bzl | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.build.yml b/.build.yml index bdd66be..2fc69ae 100644 --- a/.build.yml +++ b/.build.yml @@ -15,13 +15,13 @@ tasks: //test:gognu - test_linux-gnu: | cd bazel-zig-cc; ../bazel run \ - --platforms @com_github_ziglang_zig//:platform_x86_64-linux-gnu \ + --platforms @zig_sdk//:platform_x86_64-linux-gnu \ //test:gognu - test_linux-musl: | cd bazel-zig-cc; ../bazel run \ - --platforms @com_github_ziglang_zig//:platform_x86_64-linux-musl \ + --platforms @zig_sdk//:platform_x86_64-linux-musl \ //test:gomusl #- test_macos-gnu: | # cd bazel-zig-cc; ../bazel build --toolchain_resolution_debug=true \ - # --platforms @com_github_ziglang_zig//:platform_x86_64-macos-gnu \ + # --platforms @zig_sdk//:platform_x86_64-macos-gnu \ # //test:gognu diff --git a/README.md b/README.md index 3250b3c..2ee174d 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ $ file ../bazel-bin/test/gognu_/gognu Explicitly the toolchain explicitly `-gnu`: ``` -$ bazel run --platforms @com_github_ziglang_zig//:platform_x86_64-linux-gnu //test:gognu +$ bazel run --platforms @zig_sdk//:platform_x86_64-linux-gnu //test:gognu ``` ## linux cgo + musl ``` -$ bazel build --platforms @com_github_ziglang_zig//:platform_x86_64-linux-musl //test:gomusl +$ bazel build --platforms @zig_sdk//:platform_x86_64-linux-musl //test:gomusl ... $ file ../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/gomusl_/gomusl ../bazel-out/k8-fastbuild-ST-d17813c235ce/bin/test/gomusl_/gomusl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=redacted, with debug_info, not stripped @@ -54,7 +54,7 @@ hello, world Does not work? ``` -$ bazel build --platforms @com_github_ziglang_zig//:platform_x86_64-macos-musl //test:gognu +$ bazel build --platforms @zig_sdk//:platform_x86_64-macos-musl //test:gognu ... ``` diff --git a/test/BUILD b/test/BUILD index 6b3da2e..c9a1206 100644 --- a/test/BUILD +++ b/test/BUILD @@ -19,7 +19,7 @@ go_binary( embed = [":go_lib"], static = "on", target_compatible_with = select({ - "@platforms//os:linux": ["@com_github_ziglang_zig//:musl"], + "@platforms//os:linux": ["@zig_sdk//:musl"], "//conditions:default": [], }), visibility = ["//visibility:public"], diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index b28bdde..32a75d8 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -78,7 +78,7 @@ TARGET_CONFIGS = [ def toolchain_repositories(): zig_repository( - name = "com_github_ziglang_zig", + name = "zig_sdk", version = "0.8.0", url_format = "https://ziglang.org/download/{version}/zig-{host_platform}-{version}.tar.xz", @@ -96,7 +96,7 @@ def toolchain_repositories(): def register_all_toolchains(): for target_config in TARGET_CONFIGS: native.register_toolchains( - "@com_github_ziglang_zig//:%s_toolchain" % target_config.target, + "@zig_sdk//:%s_toolchain" % target_config.target, ) ZIG_TOOL_PATH = "tools/{zig_tool}"