1
Fork 0

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
nix
Motiejus Jakštys 2022-10-05 14:24:19 +03:00
parent c5e3c25015
commit 3a8c2eecfe
1 changed files with 2 additions and 2 deletions

View File

@ -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