In the past the instructions were to copy `emscripten_toolchain` into the project dir, now it downloads emsdk as a package so the `bazelrc` part has to refer to `@emsdk`.
When linking with `-o filename` (such as in various CMake build checks), the parameter passed to the linker is a temporary file, and it is passed as a bare filename (i.e. relative path without a `'/'`). In such cases, `outdir` would have been the empty string, and the final `tar` command would fail (actually the call to `subprocess.check_call(…)` is what fails).
* Makes provided bazel rules look up @emsdk workspace instead of local workspace
* Uses system-specific emscripten binaries instead of defaulting to linux
* Provides macros for loading emsdk dependencies (nodejs and emscripten binaries)
* Unhardcodes paths in bazel rules and .sh wrappers
* `update_bazel_workspace.sh` now updates `revisions.bzl`
* `emscripten_deps()` can be fed with specific emscripten version
* Adds external usage test
Addresses #650 and #696
* allow the bazel toolchain to output html files
* allow for cc_binary rule names to end in .js
* fix python name
* continue to call emcc instead of em++ for now
* small cleanup
Co-authored-by: Mitch Foley <mitchfoley@chromium.org>
This change comes with fairly major change to the bazel toolchain.
- Use pre-built cache that comes with emsdk
- Mark cache as readonly using FROZEN_CACHE
- Pass `--sysroot` to match upstream emscripten change
* update bazel workspace for emscripten 2.0.3
* test to make sure WORKSPACE is up to date
* make it clear what happened when WORKSPACE is out of date
* intentionally add error to make sure circleci fails properly
* revert intentionally bad commit
* increase visibility of failure message
Co-authored-by: Mitch Foley <mitchfoley@google.com>