Commit Graph

42 Commits

Author SHA1 Message Date
William Izzo
d29161158e [Bazel] Let audio workout bootstrap js file be generated. (#1404)
* Allows generation of audio worklet bootstrap js file

In order to allow users to generate the file, the allowed extension list in `link_wrapper.py` has been updated accordingly.

* adds audio worklet js to wasm_cc_binary too

---------

Co-authored-by: William Izzo <william.izzo@hey.com>
2024-06-14 12:13:50 -04:00
Yolanda-Chen
dd3b9c6208 Add feature to support WASM Relaxed SIMD (#1389) 2024-05-30 15:27:47 -04:00
walkingeyerobot
399e5396df [bazel] add tarball as an optional output (#1383)
Usage would be something like:
```
filegroup(
    name = "hello-world-tarball",
    srcs = [":hello-world-wasm"],
    output_group = "_wasm_tar",
)
```
2024-05-15 17:20:54 -04:00
Ezekiel Warren
ad59642673 fix(bazel): use param file for compile (#1373)
* fixes issues on windows when dealing with many dependencies causing a
  'command line too long' error
2024-04-22 14:19:11 -04:00
Sam Clegg
2aa7490715 3.1.53 (#1336) 2024-01-29 23:20:15 +00:00
Тhоmаs Ll
9347bc393b Fix FileExistsError on subsequent bazel builds on Windows (#1326) (#1326)
Fixes #1181.
2023-12-27 16:21:55 -05:00
walkingeyerobot
9b0db91883 [bazel] populate all_files (#1274)
Fixes #1273. This was broken by #1045 with the comment "* all_files not needed?" They were needed.
2023-08-29 10:21:25 -04:00
Derek Schuff
c8dcb45665 3.1.45 (#1269)
Also update emscripten include dir to v18, and change 17 to wildcard in emscripten deps
2023-08-23 17:27:26 +00:00
martijneken
ef2a8e929d wasm_cc_binary: Specify a default OS. Allow users to override platform. (#1262)
* wasm_cc_binary: Specify a default OS. Allow users to override platform.

Problem: https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/pull/157#discussion_r1277763118

This is solving the problem in two different ways. Please let me know
your thoughts about both approaches, as either will work.

Signed-off-by: Martijn Stevenson <mstevenson@google.com>

* Rework platform selection to trigger os:wasi off standalone attr

Signed-off-by: Martijn Stevenson <mstevenson@google.com>

---------

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
2023-07-28 21:08:04 +00:00
Robbert van Ginkel
04944ddff6 Add linux/arm64 support to bazel rules (#1156)
* 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.
2023-03-30 15:43:42 -04:00
Sam Clegg
974d5c096b 3.1.31 (#1176) 2023-01-26 19:18:45 -08:00
John Firebaugh
5b80c10e56 Upgrade to rules_nodejs 5.8.0 (#1150)
Fixes https://github.com/emscripten-core/emsdk/issues/1020
2022-12-19 18:39:40 -08:00
Robbert van Ginkel
bd7842e4ba Add standalone_wasm feature to bazel emscripten_toolchain (#1145) 2022-12-06 15:22:11 -08:00
Sam Clegg
01d3d782c8 3.1.26 (#1134) 2022-11-17 19:20:10 -08:00
Trevor Hickey
e8606a7e3b remove "name" attribute from bazel rules (#1131) 2022-11-14 13:32:13 -08:00
John Firebaugh
005063304b [bazel] Switch to platforms-based toolchain resolution (#1036) 2022-11-08 14:21:06 -08:00
Derek Schuff
26a0dea0d3 3.1.18 (#1081)
* 3.1.18

* Update LLVM include path in Bazel files
2022-08-01 12:52:09 -07:00
Ezekiel Warren
71f5fb0247 Explicit outputs for wasm_cc_binary (#1047)
* 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
2022-05-20 01:09:46 -04:00
John Firebaugh
93f21c9ef3 Optimize sandbox performance (#1045)
* 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
2022-05-09 14:30:43 -04:00
Kevin Lubick
d8a1f6c637 [bazel] Set CLOSURE_COMPILER to workaround RBE+symlinks issue (#1037)
* [bazel] Set CLOSURE_COMPILER to workaround RBE+symlinks issue

* space

* specify node_js
2022-04-27 13:13:53 -04:00
John Firebaugh
e23aac7d1c Fix https://github.com/emscripten-core/emsdk/issues/1020 (#1035) 2022-04-14 15:22:36 -04:00
Piotr Sikora
0ea8f8a870 Provide "executable" in wasm_cc_binary's DefaultInfo. (#998)
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.
2022-03-09 07:09:39 -08:00
Derek Schuff
d7d8fef23e 3.1.4 (#988)
Update emscripten-releases tags, and update Bazel include paths to match the new clang version number.
2022-02-14 18:12:25 -05:00
Matthew Soulanille
bc6209b6dc Support Bazel builds on Apple silicon (#978)
* 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>
2022-02-11 14:18:16 -05:00
Piotr Sikora
61c35abc7a Don't advertise "per_object_debug_info" feature in Bazel. (#969)
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>
2022-01-19 18:45:46 -05:00
Piotr Sikora
7eecde8afc Fix building rules_foreign_cc targets in Bazel. (#968)
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2022-01-16 15:20:53 -05:00
Ezekiel Warren
774b871eca Bazel Windows Support (#929) 2021-12-20 14:24:56 -05:00
Brad Kotsopoulos
a7e4653c22 Canonical optimization levels in bazel toolchain (#940) 2021-12-06 13:20:14 -05:00
walkingeyerobot
c7305b4045 Always output a tarball from cc_binary to simplify logic. (#936)
* 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>
2021-12-01 15:26:16 -08:00
Kevin Lubick
f8615b4782 Run buildifier on bazel/ (#913) 2021-10-19 15:56:55 -04:00
walkingeyerobot
7f39d100d8 bazel: pass -g instead of -g4 for wasm_asan feature (#904) 2021-10-13 08:07:14 -07:00
Brad Kotsopoulos
cf706316f5 [Bazel] fix llvm bin path (#888) 2021-09-09 00:46:25 -07:00
Derek Schuff
953244003b 2.0.27 (#868)
Includes LTO and non-LTO, with non-LTO as the default
2021-08-12 19:34:34 -07:00
Attila Oláh
7f983966b3 Support linking with -o filename (#849)
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).
2021-06-28 11:01:27 -07:00
Attila Oláh
eaa49511f4 Print sys.argv when link_wrapper.py is invoked incorrectly (#847)
This should help debug cases when the link_wrapper is not invoked correctly.
2021-06-24 09:05:34 -07:00
Tim Talashok
c1589b5564 Use emsdk as external bazel dependency (#766)
* 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
2021-03-24 16:50:44 -07:00
walkingeyerobot
848260ed58 Bazel add html support (#765)
* 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>
2021-03-21 20:08:54 -04:00
Tim Talashok
1a3878716f Remove absl from wasm_binary (#756)
* Remove absl from wasm_binary

* Formatting fixes

* Blank line, too

* Reorder imports
2021-03-12 13:28:55 -08:00
Sébastien Jalliffier Verne
45cd9dfc0f Fix: wrong clang path in Bazel toolchain (#699) (#700) 2021-02-07 11:51:36 -08:00
Sam Clegg
cfdcf1315b Release 2.0.13 and update bazel toolchain (#694)
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
2021-01-29 18:25:41 -08:00
Leven
5fd6f034fe fix: bazel/emscripten_toolchain/wasm_binary.py command output without mimetype on MacOS. (#682)
Co-authored-by: xulinfeng <xulinfeng@bilibili.com>
2021-01-26 14:17:30 -05:00
walkingeyerobot
5f630def2a add a wasm bazel toolchain (#603) 2020-09-10 18:42:46 -07:00