From 6566b7a03ea352189e71aa07343f91c6d5f3eb80 Mon Sep 17 00:00:00 2001 From: Mikhail Iudin Date: Fri, 6 Dec 2024 23:46:01 +0100 Subject: [PATCH] GO-4472 try to use api --- rust/Makefile | 18 ++++++++++++++++++ tantivy.go | 1 + 2 files changed, 19 insertions(+) diff --git a/rust/Makefile b/rust/Makefile index 01064b1..52d4c6a 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -3,6 +3,7 @@ all: setup: @rustup target add x86_64-unknown-linux-musl + @rustup target add aarch64-unknown-linux-musl @rustup target add armv7-linux-androideabi @rustup target add i686-linux-android @rustup target add aarch64-linux-android @@ -28,6 +29,20 @@ install-debug-linux-amd64-musl: build-debug-linux-amd64-musl @mkdir -p ../libs/linux-amd64-musl @cp target/x86_64-unknown-linux-musl/debug/libtantivy_go.a ../libs/linux-amd64-musl +build-linux-arm64-musl: + env TARGET_CC=aarch64-linux-musl-gcc cargo build --release --target aarch64-unknown-linux-musl + +install-linux-arm64-musl: build-linux-arm64-musl + @mkdir -p ../libs/linux-arm64-musl + @cp target/aarch64-unknown-linux-musl/release/libtantivy_go.a ../libs/linux-arm64-musl + +build-debug-linux-arm64-musl: + env TARGET_CC=aarch64-linux-musl-gcc cargo build --target aarch64-unknown-linux-musl + +install-debug-linux-arm64-musl: build-debug-linux-arm64-musl + @mkdir -p ../libs/linux-arm64-musl + @cp target/aarch64-unknown-linux-musl/debug/libtantivy_go.a ../libs/linux-arm64-musl + build-android-arm: env TARGET_CC=armv7a-linux-androideabi26-clang cargo build --release --target armv7-linux-androideabi @@ -170,6 +185,7 @@ install-debug-windows-amd64: build-debug-windows-amd64 install-all: \ install-linux-amd64-musl \ + install-linux-arm64-musl \ install-android-arm \ install-android-386 \ install-android-arm64 \ @@ -183,6 +199,7 @@ install-all: \ install-debug-all: \ install-debug-linux-amd64-musl \ + install-debug-linux-arm64-musl \ install-debug-android-arm \ install-debug-android-386 \ install-debug-android-arm64 \ @@ -209,6 +226,7 @@ TANTIVY_LIBS := android-386.tar.gz \ ios-arm64.tar.gz \ ios-arm64-sim.tar.gz \ linux-amd64-musl.tar.gz \ + linux-arm64-musl.tar.gz \ windows-amd64.tar.gz define download_tantivy_lib diff --git a/tantivy.go b/tantivy.go index 8a1c835..f34724c 100644 --- a/tantivy.go +++ b/tantivy.go @@ -11,6 +11,7 @@ package tantivy_go #cgo android,amd64 LDFLAGS:-L${SRCDIR}/libs/android-amd64 -ltantivy_go -lm -pthread -ldl #cgo android,arm64 LDFLAGS:-L${SRCDIR}/libs/android-arm64 -ltantivy_go -lm -pthread -ldl #cgo linux,amd64 LDFLAGS:-L${SRCDIR}/libs/linux-amd64-musl -Wl,--allow-multiple-definition -ltantivy_go -lm +#cgo linux,arm64 LDFLAGS:-L${SRCDIR}/libs/linux-arm64-musl -Wl,--allow-multiple-definition -ltantivy_go -lm #include "bindings.h" #include */