From: Bernie Innocenti Date: Sat, 8 Jul 2017 16:22:23 +0000 (-0400) Subject: Prevent global CFLAGS and CXXFLAGS from percolating into the wasm build. X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=c616910b42c0511d231b1913859bc62ecf4d6652;p=mandelwow.git Prevent global CFLAGS and CXXFLAGS from percolating into the wasm build. --- 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} .