golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.02k stars 17.54k forks source link

x/mobile: gomobile bind use CGO_LDFLAGS #59309

Open ImagineYao opened 1 year ago

ImagineYao commented 1 year ago

I need to use a so lib which has an arm64-v8a arh and an armabi-v7a arch, but when i use CGO_LDFLAGS, I can only get an aar with one arh.

CGO_LDFLAGS="-L$(LIBS_DIR)/arm64" \
gomobile bind -ldflags "-s -w" -v -target=android/arm64
截屏2023-03-29 21 04 56

The so lib is $(LIBS_DIR)/arm64 for arm64-v8a and $(LIBS_DIR)/arm for armabi-v7a

how can I build an aar with both arm64-v8a and armabi-v7a arch?

mknyszek commented 1 year ago

CC @hyangah via https://dev.golang.org/owners