Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO-4472 try to use api #13

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tantivy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdlib.h>
*/
Expand Down
Loading