Skip to content

Commit

Permalink
Fix x86_64_unknown_linux_musl build
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Feb 27, 2025
1 parent b3218e9 commit 143a353
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ cargo test --release
# Build for different architectures
build_target() {
echo "Building v${VERSION} for $1..."
if [ "$2" = "linux-musl" ]; then
# Set up Linux MUSL environment variables
export CC_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-gcc
export CXX_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-g++
export AR_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-unknown-linux-musl-gcc
if [ "$2" = "x86_64-unknown-linux-musl" ]; then
CROSS_CONTAINER_OPTS="--platform linux/amd64" cross build --release --target="$2"
else
cargo build --release --target="$2"
fi
cargo build --release --target=$2

}

# Build for each target platform
Expand Down

0 comments on commit 143a353

Please sign in to comment.