Commit Graph

200 Commits

Author SHA1 Message Date
emscripten-bot
15915cad55 Release 4.0.22 (#1644)
With emscripten-releases revisions:

https://chromium.googlesource.com/emscripten-releases/+/bebaf7e50e31865b0724f17eaa52e161e2dfef5a
(LTO)
https://chromium.googlesource.com/emscripten-releases/+/64750c136
(asserts)
2025-12-17 20:59:04 -08:00
Sam Clegg
11ea2ee53d Python fixes from ruff check (#1641) 2025-12-15 09:57:48 -08:00
emscripten-bot
b2436aafa7 Release 4.0.21 (#1638)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/50deeb529cc8a08f952af8a3087d2e27e0f77c3e
(asserts)
2025-12-02 10:36:51 -08:00
emscripten-bot
e4fe26ef59 Release 4.0.20 (#1629)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/d4fdf09ba6e7a2d75bc1f643370caf4519021e89
(asserts)
2025-11-17 17:52:11 -08:00
emscripten-bot
7b4e60e4bf Release 4.0.19 (#1626)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/b67b4278dffc6c3afb07341d70f128ae77ae0415
(asserts)
2025-11-04 19:33:51 +00:00
emscripten-bot
eb5eb4b3b2 Release 4.0.18 (#1622)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/43ce72a9c7979238d1b44c1ef8c5e3a3fd3549a7
(asserts)
2025-10-24 09:33:50 -07:00
emscripten-bot
dadf06a88d Release 4.0.17 (#1619)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/8a51f9a17741cae815acf148422bcd6d77fc1e78
(asserts)
2025-10-17 15:25:52 -07:00
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
Sam Clegg
526ceebf90 4.0.16 (#1612) 2025-10-06 16:16:31 -07:00
emscripten-bot
389a68bc35 Release 4.0.15 (#1602)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/33ad7cf09d14176b582d2c7d91d00ce433d0c753
(asserts)
2025-09-16 23:09:04 -07:00
emscripten-bot
eff90ca04a Release 4.0.14 (#1599)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/2f390179239fa46b7a22d25fc3afa4d76590510a
(asserts)
2025-09-02 23:24:36 +00:00
Sam Clegg
833fa33421 [emsdk] Remove references to old output files such as .worker.js. NFC (#1585)
Fixes: #1584
2025-08-19 12:56:30 -04:00
emscripten-bot
404dc1ec13 Release 4.0.13 (#1582)
With emscripten-releases revisions:

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

https://chromium.googlesource.com/emscripten-releases/+/17d4746128fd81d192c1685da52332c5221799bb
(asserts)
2025-08-14 20:41:34 +00: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
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