Commit Graph

187 Commits

Author SHA1 Message Date
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
emscripten-bot
d49219d03a Release 4.0.11 (#1572)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/7033fec38817ec01909b044ea0193ddd5057255c
(LTO)
https://chromium.googlesource.com/emscripten-releases/+/0eacb0d6
(asserts)

---------

Co-authored-by: Sam Clegg <sbc@chromium.org>
2025-07-14 17:23:27 +00:00
emscripten-bot
62a853cd3b Release 4.0.10 (#1565)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/ccf48a673362f11ddb6c3656405bb6a03b344052
(asserts)
2025-06-06 17:16:11 -07:00
emscripten-bot
3bcf1dcd01 Release 4.0.9 (#1559)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/27f1e0801c6ec5ea4d9a9e1d573eb1fead3525f1
(asserts)
2025-05-19 16:38:20 +00:00
emscripten-bot
419021fa04 Release 4.0.8 (#1556)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/ab275365d4057cf92d698ef99744d66cd8c7cba9
(asserts)
2025-04-30 23:22:38 +00:00
emscripten-bot
c69d433d85 Release 4.0.7 (#1549)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/4bef8973dc12f5f38022f323d67c16237bbd2962
(asserts)
2025-04-15 21:55:59 +00: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
emscripten-bot
24fc909c0d Release 4.0.6 (#1542)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/4050eaf1fd8e1c191198ec4ba8c346c4f3da0dc8
(asserts)
2025-03-26 13:14:10 -07:00
emscripten-bot
b665079cb9 Release 4.0.5 (#1536)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/71269375282224b2e662bbe009e2e3ebc40db67f
(asserts)
2025-03-12 17:52:59 +00:00
emscripten-bot
074211759c Release 4.0.4 (#1534)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/5121692126f7c96d86a13dc8462e758813e30123
(asserts)
2025-02-25 15:21:30 -08:00
David Neil
49ccc1ddeb Do not mark cache generation as local (#1533)
local=True marks a repository rule to unconditionally re-execute anytime
bazel re-evaluates the workspace (almost every invocation) It works well
for processes that execute in <10ms, not large ones like the embuilder
cache generation.

I have tested this locally and it seems to work fine, but I'll be honest
that I don't understand the nuances of repository rules that well, nor
do I know much of anything about emscripten or the circumstances in
which the cache ought to be rebuilt.

I checked the `external/@emscripten_cache.marker` file that Bazel uses
to store the cache key for if it needs to re-evaluate, and changing any
of the options passed into register_emscripten_toolchains resulted in
the cache key changing, and it correctly resulted in the cache being
regenerated.

The big question I don't have the context to answer: are there files on
disk other than these two that need to be watched for changes, so the
repository rule should change if they change:
```
FILE:@@emscripten_bin_linux//BUILD.bazel
FILE:@@emsdk//emscripten_toolchain/default_config
```
2025-02-23 16:32:28 -05: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
127ce42cd5 Release 4.0.3 (#1521)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/bae6703fb819bd84fb4dfb5e87b41cf93b6d3f2b
(asserts)
2025-02-07 18:10:18 +00: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
emscripten-bot
9dbdc4b343 Release 4.0.1 (#1510)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/c2e46b78d3dde701187d685f8c175f17425bee68
(asserts)
2025-01-17 00:18:50 +00:00
Derek Schuff
9853a6bfe6 4.0.0 (#1513)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/912ac2d711bb343205f314564ed287d883a7d888
(asserts)
2025-01-14 01:18:45 +00:00
walkingeyerobot
0e594bc6c7 Update node for bazel (#1511)
hopefully this unblocks the release?
2025-01-13 18:49:34 -05:00
emscripten-bot
3d6d8ee910 Release 3.1.74 (#1502)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/88e95307accc1f4b247b86b7a0c0e6beaf07f844
(asserts)
2024-12-13 18:10:21 -08:00
Christian Clauss
095c488961 Python lint: Use flake8 --extend-ignore instead of --ignore (#1498) 2024-12-06 15:20:31 -08:00
Christian Clauss
ac2adfeac4 Fix typos discovered by codespell (#1496)
# https://pypi.org/project/codespell
% `codespell`
```
./emsdk.py:1459: thier ==> their
./test/test.bat:1: equivilent ==> equivalent
./test/test.py:198: Specificlly ==> Specifically
./scripts/update_bazel_workspace.py:2: revisons ==> revisions
./scripts/update_node.py:11: direcotry ==> directory
./bazel/emscripten_toolchain/BUILD.bazel:57: implictly ==> implicitly
./docker/Dockerfile:87: terninal ==> terminal
```
2024-12-06 09:26:36 -08:00
Eric Higgins
c7d78534d2 bazel: update rules_nodejs and migrate to rules_js (#1436)
This finishes the work started in
https://github.com/emscripten-core/emsdk/pull/1388 by fixing CI. It
avoids a breaking change by:
* Using the latest rules_js 1.x.x version, instead of updating to
rules_js 2 (which removes support for bazel 5).
* Copying the contents of
[rules_js_dependencies](https://github.com/aspect-build/rules_js/blob/main/js/repositories.bzl)
instead of calling it, as the call would need to be added by users in
their `WORKSPACE` files

Context from the previous PR:

> Bazel's Node.js dependency comes from
[rules_nodejs](https://github.com/bazelbuild/rules_nodejs/). Previously,
bazel/deps.bzl was using rules_nodejs 5.8.0, released in 2022 and only
supported Node.js toolchains up to 18.12.1.

> This PR bumps rules_nodejs to latest 6.1.1. It also replaces
build_bazel_rules_nodejs with
[rules_js](https://github.com/aspect-build/rules_js), since npm_install
that bazel/emscripten_deps.bzl used was deprecated. The README of
rules_nodejs now recommends migrating to rules_js for everything other
than the Node.js toolchain:
(371e8cab15)

> Impetus
Our repo builds with Bazel and uses Emscripten and Node.js. Tried to
upgrade Node.js 18 to Node.js 20 and saw that emsdk didn't support
rules_nodejs 6+ in the same workspace.

Similarly, it's not possible to update to rules_js v2 in a workspace
that also references `emsdk`.
2024-12-05 02:59:04 -05:00
emscripten-bot
6abe5123c3 Release 3.1.73 (#1492)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/86f3e54628089634c6b73039955388296e920291
(asserts)
2024-11-28 01:32:35 +00:00
emscripten-bot
75eb9522ae Release 3.1.72 (#1489)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/92d39398c0016e73821548a4cd9df3df1358f6d9
(asserts)
2024-11-19 01:07:33 +00:00
emscripten-bot
59108b0e22 Release 3.1.71 (#1484)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/15b142643065fe241138c6785cb8e384504f76e8
(asserts)
2024-11-04 23:20:14 +00:00
emscripten-bot
2514ec738d Release 3.1.70 (#1481)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/11444ec05e2cc64ef42c4f33c6e3a2a7534694f2
(asserts)
2024-10-25 00:57:41 +00:00
github-actions[bot]
a36df02dc4 Release 3.1.69 (#1456)
With emscripten-releases revisions:

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

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

---------

Co-authored-by: Derek Schuff <dschuff@chromium.org>
Co-authored-by: dschuff <1122856+dschuff@users.noreply.github.com>
2024-10-11 18:27:36 -07:00
github-actions[bot]
54ef088329 Release 3.1.68 (#1453)
With emscripten-releases revisions:

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

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

Co-authored-by: emscripten-bot <179889221+emscripten-bot@users.noreply.github.com>
2024-09-30 08:35:23 -07:00
github-actions[bot]
a2383b3358 Release 3.1.67 (#1448)
With emscripten-releases revisions:

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

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

Co-authored-by: emscripten-bot <179889221+emscripten-bot@users.noreply.github.com>
2024-09-16 22:35:23 -07:00
github-actions[bot]
a72a42afc3 Release 3.1.66 (#1445)
With emscripten-releases revisions:

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

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

Co-authored-by: emscripten-bot <179889221+emscripten-bot@users.noreply.github.com>
2024-09-10 00:57:00 +00:00
Sam Clegg
3eb3e02dfd 3.1.65 (#1438) 2024-08-22 15:08:35 -07:00
Kiryl
63d09a889e [bazel] Fix some inaccuracies in bazel readme. NFC (#1434)
Edit some version variables to make correct installation and text under.
2024-08-20 09:25:41 -07:00
Kirill
cc7ef523f6 [bazel] Update README.md (#1427)
Provides simpler using and less errors
2024-07-24 15:36:24 -04:00
Alon Zakai
0b3bcbc3b0 3.1.64 (#1426) 2024-07-22 12:40:15 -07:00
Sam Clegg
772828321a 3.1.63 (#1425) 2024-07-12 09:23:42 -07:00
Sam Clegg
0fde048800 3.1.62 (#1421) 2024-07-02 11:06:41 -07:00
Michael Allwright
82d41a76d3 [Bazel] Support generating a secondary cache (#1405)
This is a working solution for generating a separate Emscripten cache.
Note that this requires an additional entry in the workspace as follows:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache()
```
When used like this, the default Emscripten cache will be used. However,
if the entry is as follows:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache(flags = ["--lto"])
```
Then embuilder will be called to build all system libraries and ports
(i.e., the `ALL` option to embuilder) with the LTO option enabled. This
can take awhile, so I have also made possible to specify which libraries
you want to build explicitly:
```starlark
load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache")
emsdk_emscripten_cache(
    flags = ["--lto"],
    libraries = [
        "crtbegin",
        "libprintf_long_double-debug",
        "libstubs-debug",
        "libnoexit",
        "libc-debug",
        "libdlmalloc",
        "libcompiler_rt",
        "libc++-noexcept",
        "libc++abi-debug-noexcept",
        "libsockets"
    ]
)
```

Resolves #807, resolves #971, resolves #1099, resolves #1362, resolves
#1401
2024-07-01 09:23:07 -07:00
Daniel Kalmar
a33daf378c Ensure temporary files have proper unique names for bazel builds. (#1415)
This attempts to fix #1386.
2024-06-27 13:50:03 -04: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
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
Derek Schuff
ca7b40ae22 3.1.61 (#1394) 2024-05-31 22:11:07 -07:00
Yolanda-Chen
dd3b9c6208 Add feature to support WASM Relaxed SIMD (#1389) 2024-05-30 15:27:47 -04:00
Derek Schuff
ce74ca2b1c 3.1.60 (#1385) 2024-05-20 23:41:54 +00: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
Sam Clegg
d52c465201 3.1.59 (#1377) 2024-04-30 07:56:18 -07:00
Sam Clegg
e0a6aa06b1 3.1.58 (#1372) 2024-04-23 10:13:28 -07: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
229d83fc70 3.1.57 (#1367) 2024-04-10 10:11:44 -07:00
Damian
90d2168e72 (bazel) Set @platforms//os:emscripten for platform_wasm (#1363)
* (bazel) Set @platforms//os:emscripten for platform_wasm

* (bazel) Set @platforms//os:emscripten for platform_wasm

* (bazel) Set @platforms//os:emscripten for platform_wasm
2024-04-04 15:04:10 -04:00
Heejin Ahn
e10826f919 3.1.56 (#1360)
#1353 turned out to be broken, so this is the second try.
2024-03-14 17:25:09 -07:00