From 3a8c2eecfebb3ee1da138db2947b73e2d55db9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 5 Oct 2022 14:24:19 +0300 Subject: [PATCH] resolve ZIG_LIB_DIR before passing it to zig That way the zig's cache keys will be the same for all sandboxes. Also see https://github.com/ziglang/zig/issues/13050#issuecomment-1268074032 --- toolchain/defs.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index 2748354..2e3dcae 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -127,7 +127,7 @@ set -e if [ -d external/zig_sdk/lib ]; then ZIG_LIB_DIR=external/zig_sdk/lib else - ZIG_LIB_DIR="$(dirname "$0")/../../lib" + ZIG_LIB_DIR="$(realpath "$(dirname "$0")/../../lib")" fi export ZIG_LIB_DIR export ZIG_LOCAL_CACHE_DIR="{cache_prefix}/bazel-zig-cc" @@ -141,7 +141,7 @@ set -e if [ -d external/zig_sdk/lib ]; then ZIG_LIB_DIR=external/zig_sdk/lib else - ZIG_LIB_DIR="$(dirname "$0")/../../lib" + ZIG_LIB_DIR="$(realpath "$(dirname "$0")/../../lib")" fi if [ -n "$TMPDIR" ]; then _cache_prefix=$TMPDIR