From 5ccfbacb8914bd220d67c95f9e9310c872eb987f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 10 Jul 2018 11:05:14 -0700 Subject: Proper error handling in add* and get* methods (#1570) See #1479 (comment) Also a one-line readme update, remove an obsolete compiler (mir2wasm) and add a new one (asterius). Also improve warning and error reporting in binaryen.js - show a stack trace when relevant (instead of node.js process.exit), and avoid atexit warning spam in debug builds. --- src/binaryen-c.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/binaryen-c.cpp') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 4dd306bd3..33281ff82 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -2601,4 +2601,12 @@ BinaryenFunctionTypeRef BinaryenGetFunctionTypeBySignature(BinaryenModuleRef mod return NULL; } +#ifdef __EMSCRIPTEN__ +// Override atexit - we don't need any global ctors to actually run, and +// otherwise we get clutter in the output in debug builds +int atexit(void (*function)(void)) { + return 0; +} +#endif + } // extern "C" -- cgit v1.2.3