fix wasm options to enable lto

This commit is contained in:
Brendan Hansknecht 2023-03-12 03:07:59 -07:00
parent 13245e1bb3
commit 056d3b133c
No known key found for this signature in database
GPG Key ID: 0EA784685083E75B

View File

@ -6,9 +6,10 @@ test-gen-llvm-wasm = "test -p roc_gen_wasm -p test_gen --no-default-features --f
[target.wasm32-unknown-unknown]
# Rust compiler flags for minimum-sized .wasm binary in the web REPL
# opt-level=s Optimizations should focus more on size than speed
# lto=fat Spend extra effort on link-time optimization across crates
rustflags = ["-Copt-level=s", "-Clto=fat"]
# opt-level=s Optimizations should focus more on size than speed
# lto=fat Spend extra effort on link-time optimization across crates
# embed-bitcode=yes Turn back on lto since it is no longer default
rustflags = ["-Copt-level=s", "-Clto=fat", "-Cembed-bitcode=yes"]
[target.'cfg(not(target = "wasm32-unknown-unknown"))']
# Sets the avx, avx2, sse2 and sse4.2 target-features correctly based on your CPU.