mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
32 lines
877 B
Bash
Executable file
32 lines
877 B
Bash
Executable file
#!/bin/bash -exuo pipefail
|
|
RUSTFLAGS="-C link-arg=-s"
|
|
|
|
if [[ "${TARGET}" == *musl ]]; then
|
|
RUSTFLAGS="${flags} -C target-feature=-crt-static"
|
|
fi
|
|
|
|
export RUSTFLAGS="${RUSTFLAGS}"
|
|
|
|
target_debian=""
|
|
case "${TARGET}" in
|
|
aarch64-unknown-linux-gnu|aarch64-unknown-linux-musl)
|
|
target_debian="aarch64-linux-gnu"
|
|
;;
|
|
arm-unknown-linux-gnueabi|arm-unknown-linux-musleabi)
|
|
target_debian="arm-linux-gnueabi"
|
|
;;
|
|
arm-unknown-linux-gnueabihf|arm-unknown-linux-musleabihf)
|
|
target_debian="arm-linux-gnueabihf"
|
|
;;
|
|
armv7-unknown-linux-gnueabihf|armv7-unknown-linux-musleabihf)
|
|
target_debian="arm-linux-gnueabihf"
|
|
;;
|
|
esac
|
|
|
|
if [[ "${target_debian}" != "" ]]; then
|
|
export CC="${target_debian}-gcc"
|
|
export CCX="${target_debian}-g++"
|
|
export CPATH="/usr/${target_debian}/include"
|
|
fi
|
|
|
|
export CARGO_BUILD_TARGET="${TARGET}"
|