Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tuna2134 authored Feb 3, 2024
1 parent ae9565d commit 4c39d46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if [ &TARGETARCH = "arm64" ]; then
CC_aarch64_unknown_linux_musl=clang;
AR_aarch64_unknown_linux_musl=llvm-ar;
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld";
if [[ &TARGETARCH = "arm64" ]]; then
CC_aarch64_unknown_linux_musl=clang
AR_aarch64_unknown_linux_musl=llvm-ar
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
else
echo "amd64 mode"
fi
cargo build --target=$(cat /tmp/arch)-unknown-linux-musl --release
cp target/$(cat /tmp/arch)-unknown-linux-musl/release/expander /tmp/expander

0 comments on commit 4c39d46

Please sign in to comment.