Skip to content

Commit

Permalink
fix: use cross for x86_64 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
praveen-em committed Apr 28, 2024
1 parent 694100f commit ccbe63c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rust/pact_ffi/release-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ cargo_flags=( "$@" )

# Build the x86_64 GNU linux release
build_x86_64_gnu() {
cargo build --target x86_64-unknown-linux-gnu "${cargo_flags[@]}"
install_cross
cross build --target x86_64-unknown-linux-gnu "${cargo_flags[@]}"

if [[ "${cargo_flags[*]}" =~ "--release" ]]; then
gzip_and_sum \
Expand All @@ -29,7 +30,8 @@ build_x86_64_gnu() {

build_x86_64_musl() {
sudo apt-get install -y musl-tools
cargo build --target x86_64-unknown-linux-musl "${cargo_flags[@]}"
install_cross
cross build --target x86_64-unknown-linux-musl "${cargo_flags[@]}"

if [[ "${cargo_flags[*]}" =~ "--release" ]]; then
BUILD_SCRIPT=$(cat <<EOM
Expand Down

0 comments on commit ccbe63c

Please sign in to comment.