diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 15:49:31 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-25 15:49:31 -0800 |
commit | 8d4226c06c843225f7ba7ff896fd21d16c614d06 (patch) | |
tree | cdf15e8609935039abebcc249bf9186ae2a54314 /system/lib | |
parent | 19a0d39383dd491f174f7d98623b7aec2547e889 (diff) |
improve nativize_llvm
Diffstat (limited to 'system/lib')
-rw-r--r-- | system/lib/debugging.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/system/lib/debugging.cpp b/system/lib/debugging.cpp new file mode 100644 index 00000000..ff9e0d68 --- /dev/null +++ b/system/lib/debugging.cpp @@ -0,0 +1,22 @@ + +// Some stuff to patch up an emscripten-sdk build so it can be built natively (see nativize_llvm) + +#include <stdio.h> +#include <stdlib.h> + +extern "C" { + +int *__errno() +{ + static int e = 0; + return &e; +} + +void __assert_func(const char *file, int line, const char *assertt, const char *cond) +{ + printf("assert-func: %s : %d : %s : %s\n", file, line, assertt, cond); + abort(); +} + +} + |