From e319ac4635a203733152775777f227e1c77ee09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 28 Apr 2023 19:05:34 +0300 Subject: [PATCH] zig cache dir: move to `/tmp/zig-cache` (#52) This cache directory can be re-used by everything and everyone. There is nothing bazel or hermetic_cc_toolchain specific there. So let's make it clear. Also, if there are any more zig-based toolchains on top of Bazel or other build systems where they cannot rely on $HOME, but need an absolute path, this feels like a reasonable choice. --- ci/test | 2 +- toolchain/defs.bzl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/test b/ci/test index 564fe64..a22916b 100755 --- a/ci/test +++ b/ci/test @@ -5,7 +5,7 @@ set -xeuo pipefail -cache_prefix="${HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX:-/tmp/hermetic_cc_toolchain}" +cache_prefix="${HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX:-/tmp/zig-cache}" # check a very hermetic setup with a single target. Re-building all of # them takes a long time, so using only one. If we ever decide to build all diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index 943fe0e..4b9eb25 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -154,7 +154,7 @@ def _zig_repository_impl(repository_ctx): if os == "windows": cache_prefix = "C:\\\\Temp\\\\hermetic_cc_toolchain" else: - cache_prefix = "/tmp/hermetic_cc_toolchain" + cache_prefix = "/tmp/zig-cache" repository_ctx.template( "tools/launcher.zig",