aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-06-05 17:05:04 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-06-05 17:05:04 +0800
commitaf3ea07591034175604ce4931ca548fd65c56a5a (patch)
treece3e62745c28ec3fcfc3f6ab43a8ea94906c3bd3
parentd375dc91093527a57cdcb6383d6319a16579ad9e (diff)
downloaddexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar.gz
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar.bz2
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar.lz
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar.xz
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.tar.zst
dexon-bls-af3ea07591034175604ce4931ca548fd65c56a5a.zip
consiger clang for wasm
-rw-r--r--include/bls/bls.h2
-rw-r--r--src/bls_c.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h
index 42e7109..820fc59 100644
--- a/include/bls/bls.h
+++ b/include/bls/bls.h
@@ -22,6 +22,8 @@
#else
#ifdef __EMSCRIPTEN__
#define BLS_DLL_API __attribute__((used))
+#elif defined(__wasm__)
+ #define BLS_DLL_API __attribute__((visibility("default")))
#else
#define BLS_DLL_API
#endif
diff --git a/src/bls_c.cpp b/src/bls_c.cpp
index 274babb..5f55785 100644
--- a/src/bls_c.cpp
+++ b/src/bls_c.cpp
@@ -43,7 +43,7 @@ extern "C" BLS_DLL_API void blsFree(void *p)
}
#endif
-#ifndef __EMSCRIPTEN__
+#if !defined(__EMSCRIPTEN__) && !defined(__wasm__)
#if defined(CYBOZU_CPP_VERSION) && CYBOZU_CPP_VERSION >= CYBOZU_CPP_VERSION_CPP11
#include <mutex>
#define USE_STD_MUTEX