Add ARM static binary #320 (arm-unknown-linux-musleabihf)

This commit is contained in:
Duncan Finney 2018-11-03 05:58:54 -04:00 committed by David Peter
parent f064ee5509
commit 831f517f5a
4 changed files with 8 additions and 3 deletions

View file

@ -25,6 +25,11 @@ matrix:
env:
- TARGET=arm-unknown-linux-gnueabihf
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
- os: linux
rust: stable
env:
- TARGET=arm-unknown-linux-musleabihf
- CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
# Beta channel.
- os: linux

View file

@ -17,7 +17,7 @@ pack() {
out_dir=$(pwd)
package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then
if [[ $TARGET == arm-unknown-linux-* ]]; then
gcc_prefix="arm-linux-gnueabihf-"
else
gcc_prefix=""

View file

@ -17,7 +17,7 @@ if [[ $TARGET == i686-unknown-linux-gnu ]]; then
fi
# needed for cross-compiling for arm
if [[ $TARGET == arm-unknown-linux-gnueabihf ]]; then
if [[ $TARGET == arm-unknown-linux-* ]]; then
sudo apt-get install -y \
gcc-4.8-arm-linux-gnueabihf \
binutils-arm-linux-gnueabihf \

View file

@ -6,6 +6,6 @@ set -ex
cargo build --target "$TARGET" --verbose
# We cannot run arm executables on linux
if [[ $TARGET != arm-unknown-linux-gnueabihf ]]; then
if [[ $TARGET != arm-unknown-linux-* ]]; then
cargo test --target "$TARGET" --verbose
fi