Commit 8e869f76 authored by Craig Donner's avatar Craig Donner

Adds support for buliding protobuf with emscripten; we just needed the proper…

Adds support for buliding protobuf with emscripten; we just needed the proper platform define used in the right place.
parent b640f216
...@@ -546,7 +546,9 @@ class Map { ...@@ -546,7 +546,9 @@ class Map {
} }
#if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \ #if __cplusplus >= 201103L && !defined(GOOGLE_PROTOBUF_OS_APPLE) && \
!defined(GOOGLE_PROTOBUF_OS_NACL) && !defined(GOOGLE_PROTOBUF_OS_ANDROID) !defined(GOOGLE_PROTOBUF_OS_NACL) && \
!defined(GOOGLE_PROTOBUF_OS_ANDROID) && \
!defined(GOOGLE_PROTOBUF_OS_EMSCRIPTEN)
template<class NodeType, class... Args> template<class NodeType, class... Args>
void construct(NodeType* p, Args&&... args) { void construct(NodeType* p, Args&&... args) {
new (static_cast<void*>(p)) NodeType(std::forward<Args>(args)...); new (static_cast<void*>(p)) NodeType(std::forward<Args>(args)...);
......
...@@ -97,6 +97,8 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR ...@@ -97,6 +97,8 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
#define GOOGLE_PROTOBUF_OS_IPHONE #define GOOGLE_PROTOBUF_OS_IPHONE
#endif #endif
#elif defined(__EMSCRIPTEN__)
#define GOOGLE_PROTOBUF_OS_EMSCRIPTEN
#elif defined(__native_client__) #elif defined(__native_client__)
#define GOOGLE_PROTOBUF_OS_NACL #define GOOGLE_PROTOBUF_OS_NACL
#elif defined(sun) #elif defined(sun)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment