diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2013-04-04 22:45:40 +0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:27:35 +0300 |
commit | 01c2ac873fdd7c219bea0dfa8cf3ba9580d8a933 (patch) | |
tree | 4a4084e045f7efa8da8de08fb4b086bd35a05aad /system | |
parent | 8ee0c6a12d1488c2fa131da25db91de0d2d44203 (diff) |
Stop using cxa_demangle in embind.
With an updated libcxx, we no longer have libcxxabi in the
include path, so we can't have the demangling code in the
build.
Diffstat (limited to 'system')
-rwxr-xr-x | system/lib/embind/bind.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system/lib/embind/bind.cpp b/system/lib/embind/bind.cpp index 417d9ffd..1619eddc 100755 --- a/system/lib/embind/bind.cpp +++ b/system/lib/embind/bind.cpp @@ -1,5 +1,7 @@ #include <emscripten/bind.h>
+#ifdef USE_CXA_DEMANGLE
#include <../lib/libcxxabi/include/cxxabi.h>
+#endif
#include <list>
#include <vector>
#include <typeinfo>
@@ -11,6 +13,7 @@ using namespace emscripten; extern "C" {
const char* EMSCRIPTEN_KEEPALIVE __getTypeName(const std::type_info* ti) {
+#ifdef USE_CXA_DEMANGLE
int stat;
char* demangled = abi::__cxa_demangle(ti->name(), NULL, NULL, &stat);
if (stat == 0 && demangled) {
@@ -27,6 +30,9 @@ extern "C" { default:
return strdup("<unknown error>");
}
+#else
+ return strdup(ti->name());
+#endif
}
}
|