Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for customizing wasm-opt options #900

Open
maratik123 opened this issue Oct 31, 2024 · 0 comments · May be fixed by #901
Open

Support for customizing wasm-opt options #900

maratik123 opened this issue Oct 31, 2024 · 0 comments · May be fixed by #901

Comments

@maratik123
Copy link

maratik123 commented Oct 31, 2024

I want to enable SIMD instructions in compiled wasm binary (it is available on most web browsers which supports wasm since 2023) via -C target-feature=+simd128
But I can not find how to enable it in wasm-opt which is calling from trunk. It is be very useful to provide additional options to wasm-opt (such as --enable-simd) from config or env variable.

Without this option trunk build --release fails with:

[wasm-validator error in function 0] unexpected false: all used features should be allowed, on 
(f32x4.splat
 (f32.div
  (local.get $45)
  (local.get $46)
 )
)
[wasm-validator error in function 0] unexpected false: SIMD operations require SIMD [--enable-simd], on 
(v128.load offset=392 align=8
 (local.get $7)
)
...
@maratik123 maratik123 linked a pull request Oct 31, 2024 that will close this issue
maratik123 added a commit to maratik123/marshrutka that referenced this issue Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant