Skip to content

Commit 56125fa

Browse files
authored
Fix specifying the dependency from SYSCALL_DEBUG to $strError() function. (#25032)
Fix specifying the dependency from SYSCALL_DEBUG to $strError() function to take place directly where the use of strError() is emitted, and not indirectly via the JS SYSCALLS object. Fixes WASMFS + SYSCALLS_DEBUG build mode, e.g. in test wasmfs.test_fs_nodefs_rw.
1 parent b132141 commit 56125fa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/lib/libcore.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,6 +2559,8 @@ function wrapSyscallFunction(x, library, isWasi) {
25592559
post += "}\n";
25602560
post += "dbg(`syscall return: ${ret}`);\n";
25612561
post += "return ret;\n";
2562+
// Emit dependency to strError() since we added use of it above.
2563+
library[x + '__deps'].push('$strError');
25622564
#endif
25632565
delete library[x + '__nothrow'];
25642566
var handler = '';

src/lib/libsyscall.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ var SyscallsLibrary = {
99
#if FILESYSTEM && SYSCALLS_REQUIRE_FILESYSTEM
1010
'$PATH',
1111
'$FS',
12-
#endif
13-
#if SYSCALL_DEBUG
14-
'$strError',
1512
#endif
1613
],
1714
$SYSCALLS: {

0 commit comments

Comments
 (0)