From 1e5cfd58e719a44934bc29cbdd7e8693f968b709 Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Sun, 11 Apr 2021 02:14:06 +0600 Subject: [PATCH] - added notes on how to build with emscripten --- .emscripten/notes.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .emscripten/notes.md diff --git a/.emscripten/notes.md b/.emscripten/notes.md new file mode 100644 index 00000000..b5864a4e --- /dev/null +++ b/.emscripten/notes.md @@ -0,0 +1,25 @@ +# Emscripten info on how to build + +1. install VSExtForEmscripten for VS 2019 +2. with chocolatey - `choco install emsdk` + +#### Where chocolatey places SDK on windows: +`\AppData\Local\emsdk\upstream\emscripten` + +## Building + +- switch optimization to O3 (Full optimization) + +- remove `/SAFESEH:NO` everywhere (if using VSExtForEmscripten) + +- remove Windows defines if copied from Win32 configuration + +- disable warnings: +c++11-narrowing;constant-conversion;writable-strings;unused-value;switch;shift-op-parentheses;parentheses;format + +add Clang parameters (Psy-X, REDRIVER2): +`-s USE_SDL=2 -s FULL_ES2=1 -s USE_WEBGL2=1 -s ASYNCIFY=1 -s ALLOW_MEMORY_GROWTH=1` + +add linker parameters (REDRIVER2): +`-s TOTAL_MEMORY=33554432 -s USE_SDL=2 -s FULL_ES2=1 -s USE_WEBGL2=1 -s ASYNCIFY=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file ../data@/` +