perform stripping during build (#10208)

* perform stripping during build

* var RUSTFLAGS
This commit is contained in:
Denis S. Soldatov aka General-Beck 2019-01-18 14:03:18 +03:00 committed by TriplEight
parent 2a7ed457dc
commit 460681ead9

View File

@ -9,6 +9,8 @@ echo "CARGO_HOME: " $CARGO_HOME
echo "CARGO_TARGET: " $CARGO_TARGET echo "CARGO_TARGET: " $CARGO_TARGET
echo "CC: " $CC echo "CC: " $CC
echo "CXX: " $CXX echo "CXX: " $CXX
#strip ON
export RUSTFLAGS=" -C link-arg=-s"
echo "_____ Building target: "$CARGO_TARGET" _____" echo "_____ Building target: "$CARGO_TARGET" _____"
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ] if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
@ -41,16 +43,6 @@ else
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
fi fi
# stripping can also be done on release build time
# export RUSTFLAGS="${RUSTFLAGS} -C link-arg=-s"
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
then
arm-linux-androideabi-strip -v ./*
else
strip -v ./*
fi
echo "_____ Calculating checksums _____" echo "_____ Calculating checksums _____"
for binary in $(ls) for binary in $(ls)
do do