meson: Add debug build.

This commit is contained in:
Jordan Petridis 2018-05-31 14:44:32 +03:00
parent 64099e37e5
commit b3d45384e1
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 9 additions and 2 deletions

View File

@ -30,7 +30,7 @@
"env" : {
"CARGO_HOME" : "/run/build/Hammond/cargo",
"RUST_BACKTRACE" : "1",
"RUSTFLAGS" : "--cfg rayon_unstable"
"DEBUG" : "true"
}
},
"modules" : [

View File

@ -3,4 +3,11 @@
export CARGO_HOME=$1/target/cargo-home
export RUSTFLAGS="--cfg rayon_unstable"
if [[ $DEBUG = true ]]
then
echo "DEBUG MODE"
cargo build -p hammond-gtk && cp $1/target/debug/hammond-gtk $2
else
echo "RELEASE MODE"
cargo build --release -p hammond-gtk && cp $1/target/release/hammond-gtk $2
fi