From 6fded218eec8667a1c8dcd467645c31eee3c8a2f Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 16 Jan 2018 23:15:36 +0000 Subject: Add asm.js to supported platforms Change-Id: I46eb5789b303040f4e62d39882f32537f637e01a Reviewed-on: https://pdfium-review.googlesource.com/22970 Reviewed-by: Tom Sepez Commit-Queue: Henrique Nakashima --- core/fxcrt/fx_system.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'core/fxcrt') 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 #include -- cgit v1.2.3