This is needed to allow custom rules and/or transitions on top of wasm_cc_binary (e.g. to workaround #972).
It's debatable whether .wasm is the correct executable target for non-standalone Wasm builds, but we don't have a way to differentiate those in wasm_cc_binary, and considering that this attribute isn't exported now, it shouldn't break anything.
* Support Bazel builds on Apple silicon
* Add sha_mac_arm64 hash for 3.1.3
* Configure node_repositories in emscripten_deps.bzl
* Add mac arm64 to bazel workspace update script
Co-authored-by: Matthew Soulanille <matthew@guppy.home>
It breaks @emsdk in workspaces that have this feature enabled.
The following error appears when using the latest commit:
cc_toolchain '@emsdk//emscripten_toolchain:everything' with
identifier 'emscripten-wasm' doesn't define a tool path for 'dwp'
The following error appears after adding `emdwp` tool and scripts:
output '*.dwo' was not created
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
* Always output a tarball from cc_binary to simplify logic. This will change the result of --config=wasm builds that were previously outputting a single file.
* better to use early return here
* Always output a tarball from cc_binary to simplify logic. This will change the result of --config=wasm builds that were previously outputting a single file.
* better to use early return here
Co-authored-by: Mitch Foley <mitchfoley@chromium.org>
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