wasm.js: Add unwind symbols needed by libc++abi (#35)

This commit is contained in:
Sam Clegg 2018-01-11 15:21:59 -08:00 committed by GitHub
parent 4b17a3b40c
commit 0bf0e9f1fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,13 @@ var math = (function() {
}; };
})(); })();
var unwind = (function() {
return {
_Unwind_RaiseException: NYI('_Unwind_RaiseException'),
_Unwind_DeleteException: NYI('_Unwind_DeleteException'),
};
})();
var runtime = (function() { var runtime = (function() {
return { return {
// TODO create a complete list from: // TODO create a complete list from:
@ -1387,7 +1394,7 @@ var ffi = (function() {
var functions = {env:{memory: memory}}; var functions = {env:{memory: memory}};
var libraries = [ var libraries = [
musl_hack, // Keep first, overriden later. musl_hack, // Keep first, overriden later.
builtins, ctype, math, runtime, stdio, stdlib, string, unix, builtins, ctype, math, runtime, stdio, stdlib, string, unix, unwind,
syscall // Keep last. syscall // Keep last.
]; ];
for (var l in libraries) for (var l in libraries)