16 Commits

Author SHA1 Message Date
DoDo
1cb55f846b [bazel] Replace deprecated '-g4' flag with '-g3' (#1611)
- this avoids deprecated flag warnings from emscripten when building
with full_debug_info or wasm_ubsan features enabled
2025-10-07 09:46:35 -04:00
emscripten-bot
f39e849eff Release 4.0.12 (#1579)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/209b886304498eff50dd835850dc5715803401ed
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/a9e9ee083503b842a14d31db764e31d65afb8910
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-08-01 17:34:28 +00:00
ZL
e062c54f43 Add bazel feature for wasm-exceptions (#1575)
This PR add bazel feature for `-fwasm-exceptions`

Part of #1400
2025-07-22 02:06:54 -04:00
Conrad Burchert
ed2035a3cc Bazel: Migrate to bzlmod (#1530)
This migrates the bazel integration to the new Bazel dependency system
"bzlmod". bzlmod is becoming mandatory this year (see second sentence
here: https://bazel.build/external/migration).

This is a backwards incompatible migration, directly removing the old
WORKSPACE based approach. Users will have to change how they depend on
bzlmod, however I assume pretty much every user will be happy about it,
because they are forced to use bzlmod anyway or add extra flags to
continue to build with newer Bazel versions. Given that users normally
depend on specific git commits in the old system, they won't be hit with
this until they decide to upgrade emsdk.

The basic principle here is simple: I took everything that WORKSPACE did
and searched an alternative in bzlmod. Some interesting bits:

- We have less worries about multiple versions and people depending on
emscripten multiple times in different ways. This is resolved by the new
system: Bazel first iterates through the MODULE.bazel files recursively,
then finds the minimum version needed for each module and then executes
the module extensions that define repos exactly once at that version. So
no more ifs needed to detect multiple inclusions.
- A bunch of nodejs stuff moves to MODULE.bazel, because that is how the
nodejs module works now. As their module extension gets executed only
once you need to declare everything that you could need before that in
the MODULE.bazel file. A side effect of that is that we have to make a
fake repository when emscripten doesn't have an arm64 binary for linux,
because we can't actually figure that out in MODULE.bazel, so we have to
declare that it always exists and then create one in all cases.

There is a bunch of autoformatter changes in here as well, I could try
to revert them if you prefer.

Closes #1509
2025-04-09 14:38:12 -07:00
Conrad Burchert
85390ce884 Bazel: Pass nodejs binary path as an environment variable. (#1518)
The current way to derive the binary path relies on a specific name for
the nodejs repository. This blocks migrating to bzlmod, as bzlmod
prefixes repository directories with the module name that created them.
By asking bazel for the path instead we always get the correct path, so
we can work with both bzlmod and WORKSPACE based dependencies at the
same time.

The repository @nodejs, used in the build label, refers to nodejs for
the host platform and is generated by the following macro (wasn't too
obvious to me):

d19d695275/nodejs/repositories.bzl (L452)

This is some work towards solving #1509.
2025-02-12 13:51:50 -05:00
emscripten-bot
539e4044b7 Release 4.0.2 (#1516)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/cc8eba40de8235f9c33d92463018f87b3edaa09e
(LTO)

https://chromium.googlesource.com/emscripten-releases/+/dc575ac9a214463b2b3503c11a1a31db665b4414
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-01-30 00:52:18 +00:00
Sam Clegg
3eb3e02dfd 3.1.65 (#1438) 2024-08-22 15:08:35 -07:00
William Izzo
0e8c5bb1e3 Sets wasm_worning_as_error disabled by default. (#1406)
This removes `-Werror` set by default, thus conforming with default
bazel cc toolchain.

Co-authored-by: William Izzo <william.izzo@hey.com>
2024-06-20 13:34:22 -04:00
Yolanda-Chen
dd3b9c6208 Add feature to support WASM Relaxed SIMD (#1389) 2024-05-30 15:27:47 -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
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
Sam Clegg
974d5c096b 3.1.31 (#1176) 2023-01-26 19:18:45 -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
John Firebaugh
005063304b [bazel] Switch to platforms-based toolchain resolution (#1036) 2022-11-08 14:21:06 -08:00