1
hermetic_cc_toolchain/toolchain
Motiejus Jakštys 50ca49181f Zig cache hacks/optimizations
Zig does not always share `libc++.a` and the glibc shims. We have observed
to be caused for 2 reasons:

- For some commands Go `chdir`s to `/tmp/`. This causes `ZIG_LIB_DIR` to be
  absolute, which blows the cache key to find the right `libc++.a` (because Zig
  thinks we are using a different lib dir to compile libc++). This is currently
  worked around in `toolchain/defs.bzl` by overfitting to Go and returning
  early from that particular invocation.
- Sometimes Bazel's sandbox messes up Zig's cache keys. If one runs without the
  sandbox (`--spawn_strategy=standalone`), the cache hit rate and thus the
  build time are much better.

This is actively investigated. I am adding `--spawn_strategy=standalone`
to CI to see the speedup that it provides. I will rollback it later.
2022-10-03 05:50:53 +03:00
..
libc Add libc constraint and libc aware toolchains 2022-04-14 14:29:06 +00:00
libc_aware Add libc constraint and libc aware toolchains 2022-04-14 14:29:06 +00:00
platform added support for Windows targets 2022-06-02 05:27:22 +03:00
private remove redundant flags 2022-10-01 23:27:58 +03:00
toolchain WIP: use relative paths for tools 2022-09-27 10:14:59 +03:00
BUILD add .build.yml 2021-06-08 06:28:15 +03:00
BUILD.sdk.bazel rename absolute_path to zig_path 2022-09-27 15:37:28 +03:00
defs.bzl Zig cache hacks/optimizations 2022-10-03 05:50:53 +03:00
zig_toolchain.bzl remove redundant flags 2022-10-01 23:27:58 +03:00