summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_system.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h
index eb07ebde00..8ad23a19c7 100644
--- a/core/fxcrt/fx_system.h
+++ b/core/fxcrt/fx_system.h
@@ -23,10 +23,11 @@
#define _FX_OS_LINUX_ 4
#define _FX_OS_MACOSX_ 7
#define _FX_OS_ANDROID_ 12
+#define _FX_OS_WASM_ 13
// _FX_PLATFORM_ values;
#define _FX_PLATFORM_WINDOWS_ 1 // _FX_OS_WIN32_ or _FX_OS_WIN64_.
-#define _FX_PLATFORM_LINUX_ 2 // _FX_OS_LINUX_ always.
+#define _FX_PLATFORM_LINUX_ 2 // _FX_OS_LINUX_ or _FX_OS_WASM_.
#define _FX_PLATFORM_APPLE_ 3 // _FX_OS_MACOSX_ always.
#define _FX_PLATFORM_ANDROID_ 4 // _FX_OS_ANDROID_ always.
@@ -46,6 +47,9 @@
#elif defined(__APPLE__)
#define _FX_OS_ _FX_OS_MACOSX_
#define _FX_PLATFORM_ _FX_PLATFORM_APPLE_
+#elif defined(__asmjs__) || defined(__wasm__)
+#define _FX_OS_ _FX_OS_WASM_
+#define _FX_PLATFORM_ _FX_PLATFORM_LINUX_
#endif
#endif // _FX_OS_
@@ -57,6 +61,10 @@
#error Sorry, VC++ 2015 or later is required to compile PDFium.
#endif // defined(_MSC_VER) && _MSC_VER < 1900
+#if _FX_OS_ == _FX_OS_WASM_ && defined(PDF_ENABLE_V8)
+#error Cannot compile v8 with wasm.
+#endif // PDF_ENABLE_V8
+
#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
#include <windows.h>
#include <sal.h>