#!/bin/bashset-ex# Add a rustup target for cross-compilationif[-n"$TARGET"];thenrustup target add "$TARGET"fi# Configure toolchaincase"$TARGET"inarm*-gnueabihf)GCC_PREFIX=arm-linux-gnueabihf-;;*-unknown-linux-musl)./ci/travis/install_musl.shGCC_PREFIX=musl-;;esacif[-n"$GCC_PREFIX"];then# Information about the cross compiler${GCC_PREFIX}gcc -v# Tell cargo which linker to use for cross compilationmkdir -p .cargoecho"[target.$TARGET]">> .cargo/configecho"linker = \"${GCC_PREFIX}gcc\"">> .cargo/configfi