From c616910b42c0511d231b1913859bc62ecf4d6652 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 8 Jul 2017 12:22:23 -0400 Subject: [PATCH] Prevent global CFLAGS and CXXFLAGS from percolating into the wasm build. --- Cargo.toml | 1 + release_wasm.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 0430f5d..4d56af3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ license = "GPL-3.0+" [profile.release] lto = true +# the crate `bitflags` is compiled with the panic strategy `abort` which is incompatible with this crate's strategy of `unwind` panic = "unwind" opt-level = 3 diff --git a/release_wasm.sh b/release_wasm.sh index bdabb1c..f3016b0 100755 --- a/release_wasm.sh +++ b/release_wasm.sh @@ -1,4 +1,6 @@ set -e +export CFLAGS="-O2" +export CXXFLAGS="$CFLAGS" cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_SDL=2 --preload-file flora.xm' cp -a target/wasm32-unknown-emscripten/release/mandelwow.js . cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow-*.{wasm,data} . -- 2.25.1