This folder contains cached wasm binaries for emscripten (C++ wasm compiler).
Caching these standard libraries saves significant amount of time for clean builds (1-3 min).
These cached libraries shouldn't change, unless we update the version of
emscripten. Instructions for updating emsdk/emscripten are in
build_defs/emscripten/repo.bzl
.
To update the cache:
- Delete everything in
emscripten_cache/asmjs
. - Update comment out the line that says
rm -rf "$EM_CACHE"
at the bottom ofbuild_defs/emscripten/emsdk_wrapper.sh
- Build a C++ wasm binary via
bazel build
. - Look at your bazel build output, and find a line that says something like
(this will be cached in "/tmp/emscripten-cache-UcBjY7Unpg/is_vanilla.txt
. - Copy everything from that tmp folder (e.g.
/tmp/emscripten-cache-UcBjY7Unpg
) into theemscripten_cache
folder in your repo. Don't copy theis_vanilla.txt
file. - Check in those new files, and revert the other changes.