1

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.
This commit is contained in:
Motiejus Jakštys 2023-04-28 19:05:34 +03:00 committed by GitHub
parent 9855851dd0
commit e319ac4635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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