Port PLS to wasm No github workflows yet because this still requires custom modifications to chrome and emscripten. Diffs= 72c5d2084 Port PLS to wasm (#5003)
diff --git a/.rive_head b/.rive_head index 36401a8..3212f09 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -6e95e7e1fcc76cc05d06b8454da4d1558a9c1d82 +72c5d2084a7ce6b0539801a342c9ff0c57c5d62e
diff --git a/build/setup_compiler.lua b/build/setup_compiler.lua index d16b4dc..48dc985 100644 --- a/build/setup_compiler.lua +++ b/build/setup_compiler.lua
@@ -1,4 +1,37 @@ -toolset (_OPTIONS["toolset"] or "clang") +-- https://github.com/TurkeyMan/premake-emscripten.git adds "emscripten" as a valid system, but +-- premake5 still doesn't accept "--os=emscripten" from the command line. To work around this we add +-- a custom "--wasm" flag that sets system to "emscripten" for us. +newoption { + trigger = "wasm", + description = "use emscripten", +} +if _OPTIONS['wasm'] +then + -- Target emscripten via https://github.com/TurkeyMan/premake-emscripten.git + -- Premake doesn't properly load the _preload.lua for this module, so we load it here manually. + -- BUG: https://github.com/premake/premake-core/issues/1235 + dofile "premake-emscripten/_preload.lua" + dofile "premake-emscripten/emscripten.lua" + system "emscripten" + toolset "emcc" +end + +filter {'system:emscripten'} +do + buildoptions { + "-msimd128", + } + linkoptions { + "-sMIN_WEBGL_VERSION=2", + "-sMAX_WEBGL_VERSION=2", + "-sALLOW_MEMORY_GROWTH", + } +end + +filter 'system:not emscripten' +do + toolset (_OPTIONS["toolset"] or "clang") +end filter 'system:windows' do