* Add linux/arm64 support to bazel rules
* Make linux arm64 sha optional and PR feedback
Not all releases have linux shas. Use getattr to default to no sha if none was
present. This way non linux arm64 builds should not fail.
* Update linux arm64 sha for 3.1.33
This is the latest arm64 release according to #1204. There do not seem to be a any releases between .21 and .33.
* Explicit outputs for wasm_cc_binary
* Backwards compatibility
* data_runfiles restore
* restore test_bazel.sh
* Using wrong path on accident
* two separate rules for legacy support
* Added name attribute to wasm_cc_binary rule
* Optimize sandbox performance
Link just the files needed to compile, link, or archive, rather than the entire directory tree. This drastically improves build times on macOS, where the sandbox is known to be slow (https://github.com/bazelbuild/bazel/issues/8230).
* Linux wants clang to link
* all_files not needed?
* Linux wants llc
* And llvm-ar
* Templated build_file_content
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