1

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.
This commit is contained in:
Motiejus Jakštys 2022-10-01 05:12:45 +03:00
parent 53975784ea
commit e9638443c6
2 changed files with 3 additions and 3 deletions

View File

@ -23,11 +23,11 @@ scratching, I promise.
Add this to your `WORKSPACE`: Add this to your `WORKSPACE`:
``` ```
BAZEL_ZIG_CC_VERSION = "v1.0.0-rc3" BAZEL_ZIG_CC_VERSION = "v1.0.0-rc2"
http_archive( http_archive(
name = "bazel-zig-cc", name = "bazel-zig-cc",
sha256 = "a309e20189d285a2185d69121b5dbe0db4a5b32e635a5add17d0d380c142585b", sha256 = "95f1204856fed7ff93257a36a39b904bbb43a72369f175d43a50063002232e0d",
strip_prefix = "bazel-zig-cc-{}".format(BAZEL_ZIG_CC_VERSION), 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)], urls = ["https://git.sr.ht/~motiejus/bazel-zig-cc/archive/{}.tar.gz".format(BAZEL_ZIG_CC_VERSION)],
) )

View File

@ -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 = str(zig).replace("/", "\\") + ".exe" if is_windows else zig,
zig_tool = zig_tool, zig_tool = zig_tool,
cache_prefix = cache_prefix, cache_prefix = cache_prefix,
common = "" if is_windows else _ZIG_TOOL_COMMON_UNIX
) )
if is_windows: if is_windows:
@ -186,7 +187,6 @@ def _zig_tool_wrapper(zig_tool, zig, is_windows, cache_prefix):
else: else:
return _ZIG_TOOL_WRAPPER_WINDOWS_CACHE_GUESS.format(**kwargs) return _ZIG_TOOL_WRAPPER_WINDOWS_CACHE_GUESS.format(**kwargs)
else: else:
kwargs["common"] = _ZIG_TOOL_COMMON_UNIX
if cache_prefix: if cache_prefix:
return _ZIG_TOOL_WRAPPER_CACHE_KNOWN.format(**kwargs) return _ZIG_TOOL_WRAPPER_CACHE_KNOWN.format(**kwargs)
else: else: