Skip to content

Commit abd465b

Browse files
authored
Add missing dependency to emscripten_runtime_keepalive_clear. NFC (#22784)
Fixes #22783
1 parent 282d3a8 commit abd465b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/library.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ addToLibrary({
8585
#if PTHREADS
8686
'$exitOnMainThread',
8787
#endif
88-
#if PTHREADS_DEBUG
88+
#if PTHREADS_DEBUG || ASSERTIONS
8989
'$runtimeKeepaliveCounter',
9090
#endif
9191
],
@@ -2016,6 +2016,9 @@ addToLibrary({
20162016
throw 'unwind';
20172017
},
20182018

2019+
#if !MINIMAL_RUNTIME
2020+
_emscripten_runtime_keepalive_clear__deps: ['$runtimeKeepaliveCounter'],
2021+
#endif
20192022
_emscripten_runtime_keepalive_clear: () => {
20202023
#if isSymbolNeeded('$noExitRuntime')
20212024
noExitRuntime = false;
@@ -2028,9 +2031,6 @@ addToLibrary({
20282031
emscripten_force_exit__deps: ['exit', '_emscripten_runtime_keepalive_clear',
20292032
#if !EXIT_RUNTIME && ASSERTIONS
20302033
'$warnOnce',
2031-
#endif
2032-
#if !MINIMAL_RUNTIME
2033-
'$runtimeKeepaliveCounter',
20342034
#endif
20352035
],
20362036
emscripten_force_exit__proxy: 'sync',

test/test_other.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14955,6 +14955,9 @@ def test_noExitRuntime_deps(self):
1495514955
def test_hello_world_argv(self):
1495614956
self.do_runf('hello_world_argv.c', 'hello, world! (1)')
1495714957

14958+
def test_strict_closure(self):
14959+
self.emcc(test_file('hello_world.c'), ['-sSTRICT', '--closure=1'])
14960+
1495814961
def test_arguments_global(self):
1495914962
self.emcc(test_file('hello_world_argv.c'), ['-sENVIRONMENT=web', '-sSTRICT', '--closure=1', '-O2'])
1496014963

0 commit comments

Comments
 (0)