Skip to content

Commit adf6379

Browse files
committed
chore: build linux x86_64 ffi against glibc 2.23
1 parent 694100f commit adf6379

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

rust/Cross.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[target.x86_64-unknown-linux-gnu]
2+
pre-build=[
3+
"apt-get update && apt-get install --assume-yes wget unzip",
4+
"wget https://github.com/protocolbuffers/protobuf/releases/download/v21.5/protoc-21.5-linux-x86_64.zip",
5+
"unzip protoc-21.5-linux-x86_64.zip -d /usr/local/"
6+
]
17
[target.aarch64-unknown-linux-gnu]
28
pre-build=[
39
"dpkg --add-architecture arm64 && apt-get update && apt-get install --assume-yes wget unzip",

rust/pact_ffi/release-linux.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ cargo_flags=( "$@" )
1515

1616
# Build the x86_64 GNU linux release
1717
build_x86_64_gnu() {
18-
cargo build --target x86_64-unknown-linux-gnu "${cargo_flags[@]}"
18+
install_cross
19+
cargo clean
20+
cross build --target x86_64-unknown-linux-gnu "${cargo_flags[@]}"
1921

2022
if [[ "${cargo_flags[*]}" =~ "--release" ]]; then
2123
gzip_and_sum \
@@ -29,6 +31,7 @@ build_x86_64_gnu() {
2931

3032
build_x86_64_musl() {
3133
sudo apt-get install -y musl-tools
34+
cargo clean
3235
cargo build --target x86_64-unknown-linux-musl "${cargo_flags[@]}"
3336

3437
if [[ "${cargo_flags[*]}" =~ "--release" ]]; then
@@ -63,6 +66,7 @@ install_cross() {
6366

6467
build_aarch64_gnu() {
6568
install_cross
69+
cargo clean
6670
cross build --target aarch64-unknown-linux-gnu "${cargo_flags[@]}"
6771

6872
if [[ "${cargo_flags[*]}" =~ "--release" ]]; then
@@ -77,6 +81,7 @@ build_aarch64_gnu() {
7781

7882
build_aarch64_musl() {
7983
install_cross
84+
cargo clean
8085
cross build --target aarch64-unknown-linux-musl "${cargo_flags[@]}"
8186

8287
if [[ "${cargo_flags[*]}" =~ "--release" ]]; then

0 commit comments

Comments
 (0)