Skip to content

Commit

Permalink
fix: correct build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
dattito committed Jul 10, 2024
1 parent a892582 commit 0b0f34f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions set_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ mkdir /.cargo
rust_target="unknown"

if [ "${TARGETARCH}" = "amd64" ]; then
rust_target="x86_64-unknown-linux-musl";
rust_target="x86_64-alpine-linux-musl";
fi

if [ "${TARGETARCH}" = "arm64" ];then
rust_target="aarch64-unknown-linux-musl";
rust_target="aarch64-alpine-linux-musl";
fi

if ["${rust_target}" = "unknown"]; then
echo "Architecture not yet supported / tested. Good luck."
exit 0
fi

cat <<EOF >> /.cargo/config.toml
[build]
target="${rust_target}"
[target.${rust_target}]
rustflags = ["-C", "target-feature=+crt-static"]
EOF

0 comments on commit 0b0f34f

Please sign in to comment.