Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ addToLibrary({
// stdlib.h
// ==========================================================================

#if !STANDALONE_WASM
// TODO: There are currently two abort() functions that get imported to asm
// module scope: the built-in runtime function abort(), and this library
// function _abort(). Remove one of these, importing two functions for the
Expand All @@ -385,6 +386,7 @@ addToLibrary({
abort('');
#endif
},
#endif

// This object can be modified by the user during startup, which affects
// the initial values of the environment accessible by getenv.
Expand Down Expand Up @@ -426,9 +428,11 @@ addToLibrary({
// assert.h
// ==========================================================================

#if !STANDALONE_WASM
__assert_fail: (condition, filename, line, func) => {
abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
},
#endif

// ==========================================================================
// time.h
Expand Down