Skip to content

Commit 27a7406

Browse files
authored
emrun: Add missing library function inclusion (#23830)
Related to #23685 This change fixes the runtime error which causes emrun to be unable to get output from a browser.
1 parent b5d2b4e commit 27a7406

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/link.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,8 @@ def phase_linker_setup(options, linker_args): # noqa: C901, PLR0912, PLR0915
674674
if user_settings.get('EXIT_RUNTIME') == '0':
675675
exit_with_error('--emrun is not compatible with EXIT_RUNTIME=0')
676676
settings.EXIT_RUNTIME = 1
677+
# emrun_postjs.js needs this library function.
678+
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$addOnExit']
677679

678680
if options.cpu_profiler:
679681
options.post_js.append(utils.path_from_root('src/cpuprofiler.js'))

0 commit comments

Comments
 (0)