From 144a87cd4c0e7347b6d620ee71804a22a4b57b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 4 Aug 2021 15:16:18 +0300 Subject: [PATCH] flock zig toolchain slower, but more robust. --- toolchain/defs.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index 8131128..1e81d75 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -163,7 +163,9 @@ else fi export ZIG_LOCAL_CACHE_DIR="$cache_prefix/bazel-zig-cc" export ZIG_GLOBAL_CACHE_DIR=$ZIG_LOCAL_CACHE_DIR -exec "{zig}" "{zig_tool}" "$@" + +# https://github.com/ziglang/zig/issues/9431 +exec flock "{zig}" "{zig}" "{zig_tool}" "$@" """ _ZIG_TOOLS = [