From 033c414529ef5ccda68953b4aade4403f963d598 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Thu, 4 Sep 2025 14:11:30 -0600 Subject: [PATCH] Add with_wasm_pthread flag --- build/rive_build_config.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build/rive_build_config.lua b/build/rive_build_config.lua index 530c2d0ac..65ff9c8f1 100644 --- a/build/rive_build_config.lua +++ b/build/rive_build_config.lua @@ -118,6 +118,11 @@ newoption({ description = 'Embed wasm directly into the js, instead of side-loading it.', }) +newoption({ + trigger = 'with_wasm_pthread', + description = 'Embed wasm directly into the js, instead of side-loading it.', +}) + newoption({ trigger = 'no-lto', description = 'Don\'t build with link time optimizations.', @@ -808,6 +813,12 @@ if _OPTIONS['arch'] == 'wasm' or _OPTIONS['arch'] == 'js' then linkoptions({ '-sSINGLE_FILE=1' }) end + filter('options:with_wasm_pthread') + do + buildoptions({ '-pthread' }) + linkoptions({ '-pthread' }) + end + filter('options:config=release') do buildoptions({ '-Oz' })