From e9638443c6769d38a072bc09d19234c210bf1742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 1 Oct 2022 05:12:45 +0300 Subject: [PATCH] tools wrapper: fix for windows 'common' is not a thing in Windows; but it needs to be defined. This makes v1.0.0-rc3 broken for Windows, and not useful (yet) for anyone else but me. Revert the README update too. --- README.md | 4 ++-- toolchain/defs.bzl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 15b8151..3bf70a4 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ scratching, I promise. Add this to your `WORKSPACE`: ``` -BAZEL_ZIG_CC_VERSION = "v1.0.0-rc3" +BAZEL_ZIG_CC_VERSION = "v1.0.0-rc2" http_archive( name = "bazel-zig-cc", - sha256 = "a309e20189d285a2185d69121b5dbe0db4a5b32e635a5add17d0d380c142585b", + sha256 = "95f1204856fed7ff93257a36a39b904bbb43a72369f175d43a50063002232e0d", 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)], ) diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index d6b2654..ce06622 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -178,6 +178,7 @@ def _zig_tool_wrapper(zig_tool, zig, is_windows, cache_prefix): zig = str(zig).replace("/", "\\") + ".exe" if is_windows else zig, zig_tool = zig_tool, cache_prefix = cache_prefix, + common = "" if is_windows else _ZIG_TOOL_COMMON_UNIX ) if is_windows: @@ -186,7 +187,6 @@ def _zig_tool_wrapper(zig_tool, zig, is_windows, cache_prefix): else: return _ZIG_TOOL_WRAPPER_WINDOWS_CACHE_GUESS.format(**kwargs) else: - kwargs["common"] = _ZIG_TOOL_COMMON_UNIX if cache_prefix: return _ZIG_TOOL_WRAPPER_CACHE_KNOWN.format(**kwargs) else: