Skip to content

Commit

Permalink
No simd canvas
Browse files Browse the repository at this point in the history
Basically disables simd for everything but our new webgl renderer runtime.

Diffs=
a0a40213f No simd canvas (#6926)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
  • Loading branch information
luigi-rosso and luigi-rosso committed Mar 26, 2024
1 parent 4f8e43d commit 8f9d5dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e2328daeb02a92171cd3c0ab78c3c76695a9dd98
a0a40213f0ea3490168fd71ad622e04ce364689b
25 changes: 23 additions & 2 deletions build/rive_build_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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' })
Expand Down

0 comments on commit 8f9d5dd

Please sign in to comment.