bazel-contrib / toolchains_llvm

LLVM toolchain for bazel
Apache License 2.0
291 stars 209 forks source link

Caching of extracted toolchains #378

Open brianv0 opened 3 weeks ago

brianv0 commented 3 weeks ago

I'd like to try to cache the extracted toolchain/repo, especially for CI purposes, but realizing this may be a limitation with bazel I can't overcome. I know this is probably a generic issue but most archives aren't as large as the llvm distribution so it's less of an issue.

In testing, it takes a bit over a minute to extract some of the llvm toolchains on my i9 macbook pro (curiously, vs 40 seconds with tar xf).

I clear out my bazel folders under /tmp and retry I always re-extract the archive. I can confirm repository cache works for the purposes of caching the binaries tarball, and that the extracted files don't end up in my disk cache.

For the purposes of CI I suppose I could periodically materialize bazel-out, but I was hoping to rely purely on the bazel caches.

mortenmj commented 2 weeks ago

Have you had a look at https://bazel.build/external/vendor ?