Skip to content

Commit 43e9e71

Browse files
authored
Merge branch 'main' into cw-audio-memory64
2 parents 2b8d764 + 9d0425f commit 43e9e71

File tree

98 files changed

+2661
-5204
lines changed

Some content is hidden

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

98 files changed

+2661
-5204
lines changed

.circleci/config.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,16 +306,18 @@ commands:
306306
- run:
307307
name: run tests (<< parameters.title >>)
308308
environment:
309-
EMTEST_LACKS_SOUND_HARDWARE: "1"
310309
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
311310
# --no-sandbox because we are running as root and chrome requires
312311
# this flag for now: https://crbug.com/638180
313312
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"
314313
CHROME_FLAGS_HEADLESS: "--headless=new --remote-debugging-port=1234"
315314
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
316315
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
316+
# The runners lack sound hardware so fallback to a dummy device (and
317+
# bypass the user gesture so audio tests work without interaction)
318+
CHROME_FLAGS_AUDIO: " --use-fake-device-for-media-stream --autoplay-policy=no-user-gesture-required"
317319
command: |
318-
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
320+
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE $CHROME_FLAGS_AUDIO"
319321
# There are tests in the browser test suite that using libraries
320322
# that are not included by "./embuilder build ALL". For example the
321323
# PIC version of libSDL which is used by test_sdl2_misc_main_module
@@ -351,15 +353,26 @@ commands:
351353
command: |
352354
wget -O ~/ff.tar.bz2 "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US"
353355
tar -C ~ -xf ~/ff.tar.bz2
356+
- run:
357+
name: Add audio dependencies
358+
command: |
359+
# This should add and start PulseAudio's dummy mixer. It will warn
360+
# that "This program is not intended to be run as root" but it can
361+
# be ignored.
362+
apt-get update -y
363+
apt-get install -q -y pulseaudio
364+
pulseaudio --start
354365
- run:
355366
name: configure firefox
356367
command: |
368+
# Note: the autoplay pref allows playback without user interaction
357369
mkdir ~/tmp-firefox-profile/
358370
cat > ~/tmp-firefox-profile/user.js \<<EOF
359371
user_pref("gfx.offscreencanvas.enabled", true);
360372
user_pref("javascript.options.shared_memory", true);
361373
user_pref("javascript.options.wasm_memory64", true);
362374
user_pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", true);
375+
user_pref("media.autoplay.default", 0);
363376
EOF
364377
- run:
365378
name: run tests (<< parameters.title >>)
@@ -369,7 +382,6 @@ commands:
369382
# support in headless mode) resolves
370383
EMTEST_LACKS_GRAPHICS_HARDWARE: "1"
371384
EMTEST_LACKS_WEBGPU: "1"
372-
EMTEST_LACKS_SOUND_HARDWARE: "1"
373385
# OffscreenCanvas support is not yet done in Firefox.
374386
EMTEST_LACKS_OFFSCREEN_CANVAS: "1"
375387
EMTEST_DETECT_TEMPFILE_LEAKS: "0"

.github/dependabot.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "github-actions" # See documentation for possible values
8+
- package-ecosystem: "npm"
9+
directory: "/" # Look for `package.json` and `lock` files in the `root` directory
10+
schedule:
11+
interval: "weekly"
12+
commit-message:
13+
prefix: "[deps]"
14+
groups:
15+
production-dependencies:
16+
dependency-type: "production"
17+
development-dependencies:
18+
dependency-type: "development"
19+
20+
- package-ecosystem: "github-actions"
921
directory: "/" # Location of package manifests
1022
schedule:
1123
interval: "weekly"
24+
commit-message:
25+
prefix: "[deps]"

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
make dist
2222
version=`cat emscripten-version.txt | sed s/\"//g`
2323
echo "VERSION=$version" >> $GITHUB_ENV
24-
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5
24+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.5
2525
with:
2626
name: emscripten-${{ env.VERSION }}
2727
path: emscripten-${{ env.VERSION }}.tar.bz2

.github/workflows/scorecards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: "Run analysis"
32-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
32+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
3333
with:
3434
results_file: results.sarif
3535
results_format: sarif
@@ -44,14 +44,14 @@ jobs:
4444

4545
# Upload the results as artifacts (optional).
4646
- name: "Upload artifact"
47-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
47+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
4848
with:
4949
name: SARIF file
5050
path: results.sarif
5151
retention-days: 5
5252

5353
# Upload the results to GitHub's code scanning dashboard.
5454
- name: "Upload to code-scanning"
55-
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
55+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
5656
with:
5757
sarif_file: results.sarif

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ See docs/process.md for more on how version tagging works.
2525
- The `--output_eol` command line flag was renamed `--output-eol` for
2626
consistency with other flags. The old name continues to work as an alias.
2727
(#20735)
28+
- Added Lua contrib port (`--use-port=contrib.lua`) to easily embed the Lua
29+
scripting language in any C/C++ Emscripten project (#23682)
30+
- The `USE_ES6_IMPORT_META` settings was removed. This setting was always
31+
on by default, but now it cannot be disabled. This setting was originally
32+
added in 2019 as a temporary measure while engines and bundlers learned to
33+
deal with `import.meta`. (#23171)
2834

2935
4.0.3 - 02/07/25
3036
----------------

bootstrap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
from tools import shared, utils
2121

2222
actions = [
23-
('npm packages', ['package.json'], [shutil.which('npm'), 'ci']),
23+
('npm packages', [
24+
'package.json',
25+
'package-lock.json'
26+
], [shutil.which('npm'), 'ci']),
2427
('create entry points', [
2528
'tools/maint/create_entry_points.py',
2629
'tools/maint/run_python.bat',

emcc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
'-iprefix', '-iwithprefix', '-iwithprefixbefore',
9494
'-isysroot', '-imultilib', '-A', '-isystem', '-iquote',
9595
'-install_name', '-compatibility_version', '-mllvm',
96-
'-current_version', '-I', '-L', '-include-pch',
96+
'-current_version', '-I', '-L', '-include-pch', '-u',
9797
'-undefined', '-target', '-Xlinker', '-Xclang', '-z'
9898
}
9999

@@ -703,7 +703,7 @@ def phase_parse_arguments(state):
703703
settings.WARN_DEPRECATED = 0
704704

705705
for i in range(len(newargs)):
706-
if newargs[i] in ('-l', '-L', '-I', '-z', '--js-library', '-o', '-x'):
706+
if newargs[i] in ('-l', '-L', '-I', '-z', '--js-library', '-o', '-x', '-u'):
707707
# Scan for flags that can be written as either one or two arguments
708708
# and normalize them to the single argument form.
709709
if newargs[i] == '--js-library':
@@ -788,7 +788,7 @@ def get_next_arg():
788788
add_link_arg(flag)
789789
elif arg == '-Xlinker':
790790
add_link_arg(get_next_arg())
791-
elif arg == '-s' or arg.startswith(('-l', '-L', '--js-library=', '-z')):
791+
elif arg == '-s' or arg.startswith(('-l', '-L', '--js-library=', '-z', '-u')):
792792
add_link_arg(arg)
793793
elif not arg.startswith('-o') and arg not in ('-nostdlib', '-nostartfiles', '-nolibc', '-nodefaultlibs', '-s'):
794794
# All other flags are for the compiler

0 commit comments

Comments
 (0)