Skip to content

Instantly share code, notes, and snippets.

@hoodie
Created June 6, 2016 20:28
Show Gist options
  • Save hoodie/2a6998cd894fb8d815b1464f89c0b011 to your computer and use it in GitHub Desktop.
Save hoodie/2a6998cd894fb8d815b1464f89c0b011 to your computer and use it in GitHub Desktop.
#!/bin/bash
BIN_NAME=asciii
unset RUSTFLAGS
cargo clean
cargo build --release && cp target/release/$BIN_NAME $BIN_NAME_release_build_no_mir
unset RUSTFLAGS
cargo clean
RUSTFLAGS="-C link-args=-s -C link-args=-Wl,-x -C opt-level=z"
cargo build --release && cp target/release/$BIN_NAME $BIN_NAME_release_build_no_mir_z
unset RUSTFLAGS
cargo clean
RUSTFLAGS="-Zorbit"
cargo build --release && cp target/release/$BIN_NAME $BIN_NAME_release_build_with_mir
unset RUSTFLAGS
cargo clean
RUSTFLAGS="-C link-args=-s -C link-args=-Wl,-x -C opt-level=z"
cargo build --release && cp target/release/$BIN_NAME $BIN_NAME_release_build_with_mir_z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment