Skip to content

Commit 1621863

Browse files
committed
Merge remote-tracking branch 'origin/main' into arsnyder16-fcoverage
# Conflicts: # test/test_core.py
2 parents 10bbd61 + ca2b854 commit 1621863

File tree

1,969 files changed

+83848
-31718
lines changed

Some content is hidden

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

1,969 files changed

+83848
-31718
lines changed

.circleci/config.yml

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ executors:
1010
linux-python:
1111
docker:
1212
- image: cimg/python:3.10.7
13+
environment:
14+
EMCC_CORES: "4"
1315
focal:
1416
docker:
1517
- image: emscripten/emscripten-ci:focal
@@ -316,7 +318,8 @@ commands:
316318
# --no-sandbox because we are running as root and chrome requires
317319
# this flag for now: https://crbug.com/638180
318320
CHROME_FLAGS_BASE: "--no-first-run -start-maximized --no-sandbox --use-gl=swiftshader --user-data-dir=/tmp/chrome-emscripten-profile --enable-experimental-web-platform-features"
319-
CHROME_FLAGS_HEADLESS: "--headless=new --remote-debugging-port=1234"
321+
# Increase the window size to avoid flaky sdl tests see #24236.
322+
CHROME_FLAGS_HEADLESS: "--headless=new --window-size=1024,768 --remote-debugging-port=1234"
320323
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
321324
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
322325
# The runners lack sound hardware so fallback to a dummy device (and
@@ -390,6 +393,8 @@ commands:
390393
# TODO: Do GL testing when https://bugzil.la/1375585 (lack of WebGL
391394
# support in headless mode) resolves
392395
EMTEST_LACKS_GRAPHICS_HARDWARE: "1"
396+
# TODO(https://github.com/emscripten-core/emscripten/issues/24205)
397+
EMTEST_LACKS_SOUND_HARDWARE: "1"
393398
EMTEST_LACKS_WEBGPU: "1"
394399
# OffscreenCanvas support is not yet done in Firefox.
395400
EMTEST_LACKS_OFFSCREEN_CANVAS: "1"
@@ -536,6 +541,7 @@ jobs:
536541
title: "asan+lsan"
537542
test_targets: "
538543
asan.test_stat
544+
asan.test_stack
539545
asan.test_float_builtins
540546
asan.test_embind*
541547
asan.test_abort_on_exceptions
@@ -546,12 +552,12 @@ jobs:
546552
asan.test_dlfcn_basic
547553
asan.test_async_hello_jspi
548554
asan.test_cubescript
549-
asan.test_wasm_worker_hello
550555
asan.test_externref_emjs_dynlink
551556
asan.test_asyncify_longjmp
552557
asan.test_pthread_run_on_main_thread
553558
asan.test_minimal_runtime_global_initializer
554559
asan.test_fs_js_api_wasmfs
560+
asan.test_modularize_instance_pthreads
555561
lsan.test_dylink_dso_needed
556562
lsan.test_stdio_locking
557563
lsan.test_dlfcn_basic
@@ -644,7 +650,31 @@ jobs:
644650
wasmfs.test_fcntl_open
645651
wasmfs.test_fs_llseek
646652
wasmfs.test_fs_llseek_rawfs
647-
wasmfs.test_freetype"
653+
wasmfs.test_freetype
654+
minimal0.test_utf
655+
"
656+
test-modularize-instance:
657+
executor: focal
658+
environment:
659+
EMTEST_SKIP_NODE_CANARY: "1"
660+
steps:
661+
- run-tests-linux:
662+
test_targets: "instance"
663+
test-esm-integration:
664+
# We don't use `bionic` here since its too old to run recent node versions:
665+
# `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found`
666+
executor: linux-python
667+
steps:
668+
- prepare-for-tests
669+
# The linux-python image uses /home/circleci rather than /root and jsvu
670+
# hardcodes /root into its launcher scripts so we need to reinstall v8.
671+
- run: rm -rf $HOME/.jsvu
672+
- install-v8
673+
- install-node-canary
674+
- run-tests:
675+
title: "esm_integration"
676+
test_targets: "esm_integration"
677+
- upload-test-results
648678
test-wasm2js1:
649679
environment:
650680
EMTEST_SKIP_NODE_CANARY: "1"
@@ -653,7 +683,7 @@ jobs:
653683
- run-tests-linux:
654684
test_targets: "wasm2js1"
655685
test-wasm64:
656-
# We don't use `bionic` here since its tool old to run recent node versions:
686+
# We don't use `bionic` here since its too old to run recent node versions:
657687
# `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found`
658688
executor: linux-python
659689
steps:
@@ -792,11 +822,12 @@ jobs:
792822
other.test_native_call_before_init
793823
other.test_node_unhandled_rejection
794824
core2.test_hello_world
795-
core2.test_esm_integration
796-
core0.test_esm_integration
825+
core2.test_esm_integration*
826+
core0.test_esm_integration*
797827
core0.test_pthread_join_and_asyncify
798828
core0.test_async_ccall_promise_jspi*
799-
core0.test_cubescript_jspi"
829+
core0.test_cubescript_jspi
830+
"
800831
# Run some basic tests with the minimum version of node that we currently
801832
# support in the generated code.
802833
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
@@ -905,6 +936,12 @@ jobs:
905936
environment:
906937
EMTEST_LACKS_WEBGPU: "1"
907938
steps:
939+
- checkout
940+
- run:
941+
name: submodule update
942+
command: git submodule update --init
943+
- pip-install
944+
- install-emsdk
908945
- run-tests-chrome:
909946
title: "browser"
910947
# Just tests that don't run in browser 2G mode
@@ -1114,9 +1151,13 @@ workflows:
11141151
- test-other:
11151152
requires:
11161153
- build-linux
1117-
- test-browser-chrome:
1154+
- test-modularize-instance:
1155+
requires:
1156+
- build-linux
1157+
- test-esm-integration:
11181158
requires:
11191159
- build-linux
1160+
- test-browser-chrome
11201161
- test-browser-chrome-2gb:
11211162
requires:
11221163
- build-linux

ChangeLog.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,64 @@ to browse the changes between the tags.
1818

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

21-
4.0.8 (in development)
21+
4.0.10 (in development)
2222
----------------------
23+
- Emscripten ports now install pkg-config `.pc` files so they will show up, for
24+
example, when you run `pkg-config --list-all` or `pkg-config --cflags
25+
<portname>`. Bare in mind that the correct PKG_CONFIG_PATH needs to be set for
26+
this to work. One way to do this is to run `emmake pkg-config`. (#24426)
27+
- libcxx, libcxxabi, and compiler-rt were updated to LLVM 20.1.4. (#24346 and
28+
#24357)
29+
- Emscripten will not longer generate trampoline functions for Wasm exports
30+
prior to the module being instantiated. Storing a reference to a Wasm export
31+
(e.g. `Module['_malloc']`) prior to instantiation will no longer work. In
32+
debug builds we generate stub functions that can detect this case. (#24384)
33+
- The `-sASYNCIFY_LAZY_LOAD_CODE` setting was deprecated. This setting was
34+
added as an experiment a long time ago and as far we know has no active users.
35+
In addition, it cannot work with JSPI (the future of ASYNCIFY). (#24383)
36+
- `-sUSE_WEBGPU` was deprecated in favor of the external port Emdawnwebgpu, a
37+
fork of Emscripten's original bindings, implementing a newer, more stable
38+
version of the standardized `webgpu.h` interface. Please try migrating using
39+
`--use-port=emdawnwebgpu`. If you find issues, verify in the [latest
40+
nightly release](https://github.com/google/dawn/releases) and file feedback
41+
with Dawn. (Emdawnwebgpu is maintained as part of Dawn, the open-source
42+
WebGPU implementation used by Chromium, but it is still cross-browser.)
43+
- The `-sMAYBE_WASM2JS` setting was removed. This was originally added for
44+
debugging purposes, and we now have `-sWASM=2` for folks that want to be able
45+
to fall back to js if wasm fails. (#24176)
46+
- The field `responseUrl` is added to `emscripten_fetch_t`. This is notably
47+
usable for obtaining resolved URL, in line with JS `XMLHttpRequest.responseURL`
48+
field. (#24414)
49+
50+
4.0.9 - 05/19/25
51+
----------------
52+
- cmake will not longer detect SDL2 or SDL3 as being present until they are
53+
installed in the sysroot. This means that they now need to be installed,
54+
either indirectly (e.g. by running any emcc command with `-sUSE_SDL=2`) or
55+
directly (e.g. by running `./embuilder build sdl2`). (#24306)
56+
- libunwind was updated to LLVM 20.1.4. (#24251)
57+
- When using cmake the EMSCRIPTEN_FORCE_COMPILERS setting was reverted to
58+
being on by default due to issues that were found with disabling it. (#24223)
59+
- Several symbols from embind (`InternalError`, `BindingError`,
60+
`count_emval_handles`) and from `libbrowser.py` (`requestFullscreen`,
61+
`requestFullScreen`, `createContext`, `getUserMedia`, `setCanvasSize`) are no
62+
longer exported by default. They can be exported using
63+
`-sEXPORTED_RUNTIME_METHODS=requestFullscreen`, for example. (#24223, #24269)
64+
- Embind: fixed support for unsigned 64-bit integers, which were previously
65+
returned to JavaScript as their signed counterparts. (#24285)
66+
- Added handing for 64-bit integer access to AddressSanitizer, `-sSAFE_HEAP` and
67+
`-sSUPPORT_BIG_ENDIAN` features. (#24283)
68+
69+
4.0.8 - 04/30/25
70+
----------------
71+
- Programs built with `-sWASM_WORKERS` and `-sAUDIO_WORKLET` no longer generate
72+
separate `.ww.js` and `.aw.js` files. This is similar to the change that was
73+
already made for pthreads in #21701. This saves on complexity, code size and
74+
network requests. (#24163, #24190)
75+
- Closure arguments can now be used from ports using `settings.CLOSURE_ARGS`
76+
(#24192)
77+
- Embind's `val` now requires a pointer policy when using pointers. e.g.
78+
`(val v(pointer, allow_raw_pointers())`.
2379

2480
4.0.7 - 04/15/25
2581
----------------
@@ -867,7 +923,7 @@ See docs/process.md for more on how version tagging works.
867923
`ASSERTIONS` is enabled. This option is mainly for the users who want only
868924
exceptions' stack traces without turning `ASSERTIONS` on. (#18642 and #18535)
869925
- `SUPPORT_LONGJMP`'s default value now depends on the exception mode. If Wasm
870-
EH (`-fwasm-exception`) is used, it defaults to `wasm`, and if Emscripten EH
926+
EH (`-fwasm-exceptions`) is used, it defaults to `wasm`, and if Emscripten EH
871927
(`-sDISABLE_EXCEPTION_CATCHING=0`) is used or no exception support is used, it
872928
defaults to `emscripten`. Previously it always defaulted to `emscripten`, so
873929
when a user specified `-fwasm-exceptions`, it resulted in Wasm EH + Emscripten

bootstrap.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,23 @@
1010
import argparse
1111
import os
1212
import shutil
13+
import subprocess
1314
import sys
1415

1516
__rootdir__ = os.path.dirname(os.path.abspath(__file__))
1617
sys.path.insert(0, __rootdir__)
1718

1819
STAMP_DIR = os.path.join(__rootdir__, 'out')
1920

20-
from tools import shared, utils
21+
# N.b. This script bootstrap.py cannot use 'from tools import shared',
22+
# because shared.py requires that a valid .emscripten config is already
23+
# created. Bootstrap.py needs to be run before an .emscripten config exists.
24+
from tools import utils
2125

2226
actions = [
2327
('npm packages', [
2428
'package.json',
25-
'package-lock.json'
29+
'package-lock.json',
2630
], ['npm', 'ci']),
2731
('create entry points', [
2832
'tools/maint/create_entry_points.py',
@@ -93,7 +97,7 @@ def main(args):
9397
if not cmd[0]:
9498
utils.exit_with_error(f'command not found: {orig_exe}')
9599
print(' -> %s' % ' '.join(cmd))
96-
shared.run_process(cmd, cwd=utils.path_from_root())
100+
subprocess.run(cmd, check=True, text=True, encoding='utf-8', cwd=utils.path_from_root())
97101
utils.safe_ensure_dirs(STAMP_DIR)
98102
utils.write_file(stamp_file, 'Timestamp file created by bootstrap.py')
99103
return 0

0 commit comments

Comments
 (0)