From b12788a51cc92ef79ac6bf8b147d6c9adffacd48 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 3 Mar 2022 12:56:45 -0500 Subject: [PATCH] Revert "stuff" This reverts commit e5a68f29b29fbbe689f1c98b1f3d9b1939bcb42b. --- .cargo/config.toml | 4 ++-- build.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 9258992..865dedb 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ -[build] -rustflags = ["-C", "linker-plugin-lto=yes", "-C", "inline-threshold=275", "-C", "link-arg=-s"] +[target.wasm32-unknown-unknown] +rustflags = ["-C", "linker-plugin-lto=yes", "-C", "inline-threshold=275"] diff --git a/build.sh b/build.sh index b0367d8..762040d 100755 --- a/build.sh +++ b/build.sh @@ -5,13 +5,14 @@ rm -fr tmp pkg | true #delete tmp folder if exists #apply optimizations via wasm-opt wasm_opt() { - wasm-opt -Oz -o pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm + wasm-opt -Os -o pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm mv pkg/integral_site_bg_2.wasm pkg/integral_site_bg.wasm } if test "$1" == "" || test "$1" == "release"; then wasm-pack build --target web --release --no-typescript wasm_opt #apply wasm optimizations + llvm-strip --strip-all pkg/integral_site_bg.wasm elif test "$1" == "debug"; then wasm-pack build --target web --debug --no-typescript