diff --git a/.rive_head b/.rive_head index 6f9ea6fc..da4ec7bd 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -e2328daeb02a92171cd3c0ab78c3c76695a9dd98 +a0a40213f0ea3490168fd71ad622e04ce364689b diff --git a/build/rive_build_config.lua b/build/rive_build_config.lua index 25f9c3d9..f9543e7c 100644 --- a/build/rive_build_config.lua +++ b/build/rive_build_config.lua @@ -74,6 +74,11 @@ newoption({ description = 'don\'t disable exceptions (nonstandard for Rive)', }) +newoption({ + trigger = 'no-wasm-simd', + description = 'disable simd for wasm builds', +}) + newoption({ trigger = 'wasm_single', description = 'Embed wasm directly into the js, instead of side-loading it.', @@ -113,7 +118,7 @@ do optimize('On') end -filter({ 'options:config=release', 'options:not no-lto', 'system:not macosx', 'system:not ios'}) +filter({ 'options:config=release', 'options:not no-lto', 'system:not macosx', 'system:not ios' }) do flags({ 'LinkTimeOptimization' }) end @@ -408,10 +413,26 @@ if _OPTIONS['arch'] == 'wasm' or _OPTIONS['arch'] == 'js' then filter('options:arch=wasm') do - buildoptions({ '-msimd128' }) linkoptions({ '-sWASM=1' }) end + filter({ 'options:arch=wasm', 'options:not no-wasm-simd' }) + do + buildoptions({ '-msimd128' }) + end + + filter({ 'options:arch=wasm', 'options:config=debug' }) + do + buildoptions({ + '-fsanitize=address', + '-g2', + }) + linkoptions({ + '-fsanitize=address', + '-g2', + }) + end + filter('options:arch=js') do linkoptions({ '-sWASM=0' })