diff --git a/3rdparty/nvtt/nvcore/nvcore.h b/3rdparty/nvtt/nvcore/nvcore.h index 689feff..e2458e2 100644 --- a/3rdparty/nvtt/nvcore/nvcore.h +++ b/3rdparty/nvtt/nvcore/nvcore.h @@ -139,6 +139,8 @@ # define NV_CPU_ARM 1 #elif defined POSH_CPU_AARCH64 # define NV_CPU_AARCH64 1 +#elif defined POSH_CPU_EMSCRIPTEN +# define NV_CPU_EMSCRIPTEN 1 #else # error "Unsupported CPU" #endif @@ -163,6 +165,10 @@ # define NV_CPU_AARCH64 0 #endif // NV_CPU_AARCH64 +#ifndef NV_CPU_EMSCRIPTEN +# define NV_CPU_EMSCRIPTEN 0 +#endif // NV_CPU_EMSCRIPTEN + // Compiler: #if defined POSH_COMPILER_CLANG diff --git a/3rdparty/nvtt/nvcore/posh.h b/3rdparty/nvtt/nvcore/posh.h index 45d2d9e..b597125 100644 --- a/3rdparty/nvtt/nvcore/posh.h +++ b/3rdparty/nvtt/nvcore/posh.h @@ -296,7 +296,7 @@ LLVM: ** Determine target operating system ** ---------------------------------------------------------------------------- */ -#if defined linux || defined __linux__ +#if defined linux || defined __linux__ || defined EMSCRIPTEN # define POSH_OS_LINUX 1 # define POSH_OS_STRING "Linux" #endif @@ -536,6 +536,11 @@ LLVM: # define POSH_CPU_STRING "PA-RISC" #endif +#if defined EMSCRIPTEN +# define POSH_CPU_EMSCRIPTEN 1 +# define POSH_CPU_STRING "EMSCRIPTEN" +#endif + #if !defined POSH_CPU_STRING # error POSH cannot determine target CPU # define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ @@ -673,7 +678,7 @@ LLVM: ** the MIPS series, so we have to be careful about those. ** ---------------------------------------------------------------------------- */ -#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ +#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ || defined POSH_CPU_EMSCRIPTEN # define POSH_ENDIAN_STRING "little" # define POSH_LITTLE_ENDIAN 1 #else