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' })