From 52a8d1217d845fd94b792d67056cd33fcc1ef7ac Mon Sep 17 00:00:00 2001
From: Floris <mgfloris0106@gmail.com>
Date: Mon, 25 Nov 2024 13:58:37 +0100
Subject: [PATCH] Added Emscripten support (see
 https://github.com/electronicarts/EASTL/issues/520)

---
 include/EABase/config/eaplatform.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/EABase/config/eaplatform.h b/include/EABase/config/eaplatform.h
index 37360f26..dd89dc2a 100644
--- a/include/EABase/config/eaplatform.h
+++ b/include/EABase/config/eaplatform.h
@@ -613,6 +613,13 @@
 		#define EA_PLATFORM_WINRT 1 
 	#endif
 
+#elif defined(__EMSCRIPTEN__) || defined(__wasm__) || defined(__wasm32__) || defined(__wasm64__)
+	#define EA_PROCESSOR_EMSCRIPTEN 1
+	#define EA_SYSTEM_LITTLE_ENDIAN 1
+	#define EA_PLATFORM_DESCRIPTION "Emscripten WASM"
+	#define EA_PLATFORM_POSIX 1
+	#define EASTL_DEBUG_BREAK_OVERRIDE 1 // disable it
+
 // Sun (Solaris)
 // __SUNPRO_CC is defined by the Sun compiler.
 // __sun is defined by the GCC compiler.