Skip to content

Commit

Permalink
Add build script for static build linux release
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Smet <[email protected]>
  • Loading branch information
LeeSmet committed Dec 13, 2021
1 parent fc76736 commit 3953251
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions make_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e
set -x

features=("+aes" "+avx" "+sse" "+sse2" "+sse3" "+sse4.1" "+sse4.2" "+ssse3" "+xsave" "+xsavec" "+xsaveopt" "+xsaves")
for f in ${features[@]}; do
RUSTFLAGS="-C target-feature=$f $RUSTFLAGS"
done
mkdir -p release
cargo build --target x86_64-unknown-linux-musl --release --features vendored
cp ./target/x86_64-unknown-linux-musl/release/zstor_v2 release
pushd release
strip zstor_v2
mv zstor_v2 zstor_v2-x86_64-linux-musl
popd

0 comments on commit 3953251

Please sign in to comment.