Skip to content

Commit 052cd1a

Browse files
authored
Error on use of for MINIMAL_RUNTIME_STREAMING_* + SINGLE_FILE (#24859)
Fundamentally streaming compilation and streaming instantiation operate on fetch responses but in `SINGLE_FILE` mode the module bytes are always local.
1 parent 03b668a commit 052cd1a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ See docs/process.md for more on how version tagging works.
2323
- emcc will now error if `MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION` is used
2424
when not generating html output. This was always incompatible but previously
2525
ignored. (#24849)
26+
- emcc will now error if `MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION` or
27+
`MINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION` are used with `SINGLE_FILE`.
28+
These are fundamentally incompatible but were previously ignored. (#24849)
2629

2730
4.0.12 - 08/01/25
2831
-----------------

test/test_other.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,12 @@ def test_minimal_runtime_errors(self):
16611661
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMINIMAL_RUNTIME', '-sMINIMAL_RUNTIME_STREAMING_WASM_COMPILATION'])
16621662
self.assertContained('emcc: error: MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION is only compatible with html output', err)
16631663

1664+
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMINIMAL_RUNTIME', '-sMINIMAL_RUNTIME_STREAMING_WASM_COMPILATION', '-oout.html', '-sSINGLE_FILE'])
1665+
self.assertContained('emcc: error: MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION is not compatible with SINGLE_FILE', err)
1666+
1667+
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMINIMAL_RUNTIME', '-sMINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION', '-oout.html', '-sSINGLE_FILE'])
1668+
self.assertContained('emcc: error: MINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION is not compatible with SINGLE_FILE', err)
1669+
16641670
def test_export_all_and_exported_functions(self):
16651671
# EXPORT_ALL should not export library functions by default.
16661672
# This means that to export library function you also need to explicitly

tools/link.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ def report_incompatible_settings():
668668
('STRICT_JS', 'MODULARIZE', None),
669669
('STRICT_JS', 'EXPORT_ES6', None),
670670
('MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION', 'MINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION', 'they are mutually exclusive'),
671+
('MINIMAL_RUNTIME_STREAMING_WASM_COMPILATION', 'SINGLE_FILE', None),
672+
('MINIMAL_RUNTIME_STREAMING_WASM_INSTANTIATION', 'SINGLE_FILE', None),
671673
('SEPARATE_DWARF', 'WASM2JS', 'as there is no wasm file'),
672674
('GL_SUPPORT_AUTOMATIC_ENABLE_EXTENSIONS', 'NO_GL_SUPPORT_SIMPLE_ENABLE_EXTENSIONS', None),
673675
('MODULARIZE', 'NODEJS_CATCH_REJECTION', None),

0 commit comments

Comments
 (0)