Skip to content

Commit 55d37cf

Browse files
authored
Merge branch 'main' into issue-20983
2 parents 9fc8bd1 + 389b097 commit 55d37cf

File tree

123 files changed

+3199
-2619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3199
-2619
lines changed

.circleci/config.yml

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,22 @@ commands:
106106
echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> ~/emsdk/.emscripten
107107
cat ~/emsdk/.emscripten
108108
echo "export PATH=\"$HOME/node-v${version}-linux-x64/bin:\$PATH\"" >> $BASH_ENV
109-
install-node-latest:
110-
description: "install latest version of node"
109+
install-node-oldest:
110+
description: "install node (oldest)"
111111
steps:
112112
- install-node-version:
113-
node_version: "19.0.0"
113+
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
114+
node_version: "12.22.9"
115+
install-node-lts:
116+
description: "install node (current LTS)"
117+
steps:
118+
- install-node-version:
119+
node_version: "22.21.0"
120+
install-node-newest:
121+
description: "install node (newest)"
122+
steps:
123+
- install-node-version:
124+
node_version: "24.10.0"
114125
install-node-canary:
115126
description: "install canary version of node"
116127
steps:
@@ -253,9 +264,6 @@ commands:
253264
# Must be absolute path or relative path from working_directory
254265
at: ~/
255266
- checkout
256-
- run:
257-
name: submodule update
258-
command: git submodule update --init
259267
- emsdk-env
260268
- bootstrap
261269
- pip-install
@@ -376,9 +384,6 @@ commands:
376384
at: ~/
377385
- checkout
378386
- remove-linux-binaries
379-
- run:
380-
name: submodule update
381-
command: git submodule update --init
382387
run-tests-firefox:
383388
description: "Runs emscripten tests under firefox"
384389
parameters:
@@ -866,9 +871,6 @@ jobs:
866871
executor: linux-python
867872
steps:
868873
- checkout
869-
- run:
870-
name: submodule update
871-
command: git submodule update --init
872874
- pip-install
873875
- install-emsdk
874876
- run:
@@ -891,9 +893,6 @@ jobs:
891893
executor: linux-python
892894
steps:
893895
- checkout
894-
- run:
895-
name: submodule update
896-
command: git submodule update --init
897896
- pip-install
898897
- install-emsdk
899898
- run:
@@ -921,9 +920,6 @@ jobs:
921920
EMTEST_SKIP_V8: "1"
922921
steps:
923922
- checkout
924-
- run:
925-
name: submodule update
926-
command: git submodule update --init
927923
- pip-install
928924
- install-emsdk
929925
# `install-node-version` only changes the NODE_JS_TEST (the version of
@@ -957,9 +953,7 @@ jobs:
957953
"
958954
# Run some basic tests with the minimum version of node that we currently
959955
# support in the generated code.
960-
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
961-
- install-node-version:
962-
node_version: "12.22.9"
956+
- install-node-oldest
963957
- run-tests:
964958
title: "node (oldest / 12.22.9)"
965959
extra-cflags: "-sMIN_NODE_VERSION=122209"
@@ -1023,10 +1017,28 @@ jobs:
10231017
core2.test_unistd_unlink_rawfs
10241018
core2.test_unistd_write_broken_link_rawfs
10251019
"
1020+
# Run a few test with the most recent LTS version of node
1021+
- install-node-lts
1022+
- run-tests:
1023+
# Run tests that on older versions of node would require flags, but
1024+
# those flags should not be injected on newer versions.
1025+
title: "node (lts)"
1026+
test_targets: "-v
1027+
other.test_gen_struct_info
1028+
other.test_native_call_before_init
1029+
other.test_node_unhandled_rejection
1030+
other.test_js_optimizer_verbose
1031+
other.test_min_node_version
1032+
other.test_node_emscripten_num_logical_cores
1033+
core2.test_pthread_create
1034+
core2.test_i64_invoke_bigint
1035+
core2.test_sse2
1036+
core2.test_source_map
1037+
core2.test_exceptions_wasm_legacy
1038+
core2.test_pthread_unhandledrejection
1039+
"
10261040
# Run a few test with the most recent version of node
1027-
# In particular we have some tests that require node flags on older
1028-
# versions of node but not with the most recent version.
1029-
- install-node-latest
1041+
- install-node-newest
10301042
- run-tests:
10311043
# Run tests that on older versions of node would require flags, but
10321044
# those flags should not be injected on newer versions.
@@ -1043,7 +1055,8 @@ jobs:
10431055
core2.test_sse2
10441056
core2.test_source_map
10451057
core2.test_exceptions_wasm_legacy
1046-
core2.test_pthread_unhandledrejection"
1058+
core2.test_pthread_unhandledrejection
1059+
"
10471060
- upload-test-results
10481061
test-other:
10491062
executor: focal
@@ -1065,9 +1078,6 @@ jobs:
10651078
EMTEST_LACKS_WEBGPU: "1"
10661079
steps:
10671080
- checkout
1068-
- run:
1069-
name: submodule update
1070-
command: git submodule update --init
10711081
- pip-install
10721082
- install-emsdk
10731083
- run-tests-chrome:
@@ -1152,9 +1162,6 @@ jobs:
11521162
executor: focal
11531163
steps:
11541164
- checkout
1155-
- run:
1156-
name: submodule update
1157-
command: git submodule update --init
11581165
- pip-install
11591166
- install-emsdk
11601167
- run-tests-firefox:
@@ -1278,9 +1285,9 @@ jobs:
12781285
steps:
12791286
- setup-macos
12801287
- install-emsdk
1288+
- pip-install:
1289+
python: "$EMSDK_PYTHON"
12811290
- freeze-cache
1282-
# TODO: We can't currently do pip install here since numpy and other packages
1283-
# are currently missing arm64 macos binaries.
12841291
- run-tests:
12851292
title: "crossplatform tests"
12861293
test_targets: "--crossplatform-only"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature deprecation
3+
about: Use this template for removal of features from emscripten.
4+
title: 'Deprecation proposal for <FEATURE>'
5+
labels: 'deprecation'
6+
assignees: ''
7+
8+
---
9+
10+
Tracking issue for the deprecation and removal of <FEATURE>.
11+
12+
The process for deprecating and removing features from emscripten is laid out out in https://github.com/emscripten-core/emscripten/blob/main/docs/process.md#deprecating-settings-and-features.
13+
14+
At any point in the process we may decide to delay or abort the deprecation and close this issue.
15+
16+
Deprecation checklist:
17+
18+
- [ ] Open an issue (this)
19+
- [ ] Perform global search for usage in public repos
20+
- [ ] Send message to emscripten-discuss
21+
- [ ] Add "deprecation" warning to emcc
22+
- [ ] Wait at least 4 releases or 2 months
23+
- [ ] Remove feature from codebase

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@ jobs:
7171
echo ""
7272
echo "Test expectations are out-of-date on the target branch."
7373
echo "Please run the 'Rebaseline Tests' github action on the target"
74-
echo "branch (normally 'main') before proceeding."
74+
echo "branch (normally 'main') before proceeding. You can do this"
75+
echo "from the web UI or from the command line:"
7576
echo ""
76-
echo "You can also run './tools/maint/rebaseline_tests.py --new-branch'"
77-
echo "and use it to create a seperate PR."
77+
echo " gh workflow run rebaseline-tests.yml"
78+
echo ""
79+
echo "You can also run the following command locally and upload"
80+
echo "your own PR:"
81+
echo ""
82+
echo " ./tools/maint/rebaseline_tests.py --new-branch'"
7883
exit 1
7984
fi
8085
- name: Check test expectations on PR branch

ChangeLog.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,35 @@ to browse the changes between the tags.
1818

1919
See docs/process.md for more on how version tagging works.
2020

21-
4.0.18 (in development)
21+
4.0.20 (in development)
2222
-----------------------
23+
24+
4.0.19 - 11/04/25
25+
-----------------
26+
- The `RETAIN_COMPILER_SETTINGS` setting and the corresponding
27+
`emscripten_get_compiler_setting` API no longer store or report internal
28+
compiler settings (those listed in `setttings_internal.js`). We made an
29+
exception here for `EMSCRIPTEN_VERSION` which is the only internal setting
30+
where we could find usage of `emscripten_get_compiler_setting` (in a global
31+
GitHub search). (#25667)
32+
- When using dynamic linking the main module is no longer built as a relocatable
33+
binary. This will significantly reduce the overhead of dynamic linking for
34+
the main program, for example, eliminating all internal relocations. If you
35+
encounter any issues with new default it is possible to revert to the old
36+
behaviour by adding `-sRELOCATABLE` when linking the main module. (#25522)
37+
38+
4.0.18 - 10/24/25
39+
-----------------
2340
- The `emrun.py` script no longer support running on python2. (#25597)
2441
- `-sUSE_WEBGPU` was removed in favor of the external port Emdawnwebgpu which
2542
are used via `--use-port=emdawnwebgpu`. See 4.0.10 release notes for details.
2643
- A new `CROSS_ORIGIN` setting was added in order to work around issues hosting
2744
emscripten programs across different origins (#25581)
45+
- The binary data encoding for `SINGLE_FILE` mode was changed from base64 to
46+
directly embed binary data into UTF-8 string. Users who use the `SINGLE_FILE`
47+
mode along with a custom HTML file should declare the files to have UTF-8
48+
encoding. See `src/settings.js` docs on `SINGLE_FILE`. Use the option
49+
`-sSINGLE_FILE_BINARY_ENCODE=0` to fall back to base64 encoding. (#25599)
2850

2951
4.0.17 - 10/17/25
3052
-----------------

docs/process.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ decide collectively to abandon the deprecation, or to delay it.
314314
warning when the feature is used. For settings this is normally as simple
315315
as adding it to `DEPRECATED_SETTINGS` in `settings.py`.
316316

317-
4. Perform a global search of public github repositories for usage of the
318-
feature. If you work for a company with a large internal codebase (e.g.
319-
Google) please also search globally there.
317+
4. Perform a [global search][global_github_search] of public GitHub repositories
318+
for usage of the feature. If you work for a company with a large internal
319+
codebase (e.g. Google) please also search globally there.
320320

321321
5. Feedback from steps (2), (3) and (4) should be summarized in the bug where
322322
discussions about the impact of deprecation can then proceed.
@@ -356,3 +356,4 @@ decide collectively to abandon the deprecation, or to delay it.
356356
[update_libcxxabi_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_libcxxabi.py
357357
[update_libunwind_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_libunwind.py
358358
[update_musl_emscripten]: https://github.com/emscripten-core/emscripten/blob/main/system/lib/update_musl.py
359+
[global_github_search]: https://github.com/search?q=%2F%28%3F-i%29%5CbMY_SETTING%5Cb%2F+-org%3Aemscripten-core+-path%3Aemcc.*+-path%3Asettings.*+-path%3Asettings_reference.*&type=code

embuilder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
'crtbegin',
121121
'libsanitizer_common_rt',
122122
'libubsan_rt',
123+
'libwasm_workers-debug',
123124
'libwasm_workers-debug-stub',
124125
'libfetch',
125126
'libfetch-mt',
@@ -215,10 +216,10 @@ def main():
215216
args = parser.parse_args()
216217

217218
if args.operation != 'rebuild' and len(args.targets) == 0:
218-
shared.exit_with_error('no build targets specified')
219+
utils.exit_with_error('no build targets specified')
219220

220221
if args.operation == 'rebuild' and not USE_NINJA:
221-
shared.exit_with_error('"rebuild" operation is only valid when using Ninja')
222+
utils.exit_with_error('"rebuild" operation is only valid when using Ninja')
222223

223224
# process flags
224225

0 commit comments

Comments
 (0)