Prevent global CFLAGS and CXXFLAGS from percolating into the wasm build.
authorBernie Innocenti <bernie@codewiz.org>
Sat, 8 Jul 2017 16:22:23 +0000 (12:22 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Sat, 8 Jul 2017 16:31:14 +0000 (12:31 -0400)
Cargo.toml
release_wasm.sh

index 0430f5df016533dfb897efa4bc9f8152735e7794..4d56af3aeb5f6c332da83121de4dd80aae099f3f 100644 (file)
@@ -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
 
index bdabb1c7ff9710236d51ec30962a5233c74f5801..f3016b0907ccb1e1cefcf9d752a06d4bf1077389 100755 (executable)
@@ -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} .