gupaxx/build.sh

21 lines
604 B
Bash
Raw Normal View History

2022-10-01 16:58:22 +00:00
#!/usr/bin/env bash
set -e
[[ $PWD = */gupax ]]
if [[ $1 = *all* ]]; then
echo "=== building all ==="
echo "=== windows ==="
cargo build --profile optimized --target x86_64-pc-windows-gnu
# echo "=== macos ==="
# cargo build --profile optimized --target x86_64-apple-darwin
echo "=== linux ==="
cargo build --profile optimized
du -hs target/x86_64-pc-windows-gnu/optimized/gupax target/x86_64-apple-darwin/optimized/gupax target/optimized/gupax
else
echo "=== building linux cpu optimized ==="
RUSTFLAGS="-C target-cpu=native" cargo build --profile optimized
du -hs target/optimized/gupax
fi