File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ IOS_BUILD_DIR := $(MOBILE_BUILD_DIR)/ios
2222IOS_BUILD := $(IOS_BUILD_DIR ) /Lndmobile.xcframework
2323ANDROID_BUILD_DIR := $(MOBILE_BUILD_DIR ) /android
2424ANDROID_BUILD := $(ANDROID_BUILD_DIR ) /Lndmobile.aar
25+ # For Android, set max page size to 16KB to support devices using 16KB memory pages.
26+ # Reference: https://developer.android.com/guide/practices/page-sizes
27+ ANDROID_MAX_PAGE_SIZE := 16384
28+ ANDROID_EXTLDFLAGS := -extldflags '-Wl,-z,max-page-size=$(ANDROID_MAX_PAGE_SIZE ) '
2529
2630COMMIT := $(shell git describe --tags --dirty)
2731
@@ -494,7 +498,7 @@ macos: mobile-rpc
494498android : mobile-rpc
495499 @$(call print, "Building Android library ($(ANDROID_BUILD ) ) ." )
496500 mkdir -p $(ANDROID_BUILD_DIR )
497- $(GOMOBILE_BIN ) bind -target=android -androidapi 21 -tags=" mobile $( DEV_TAGS) $( RPC_TAGS) " -ldflags " $( RELEASE_LDFLAGS) " -v -o $(ANDROID_BUILD ) $(MOBILE_PKG )
501+ $(GOMOBILE_BIN ) bind -target=android -androidapi 21 -tags=" mobile $( DEV_TAGS) $( RPC_TAGS) " -ldflags " $( RELEASE_LDFLAGS) $( ANDROID_EXTLDFLAGS ) " -v -o $(ANDROID_BUILD ) $(MOBILE_PKG )
498502
499503# ? mobile: Build mobile RPC stubs and project templates for iOS and Android
500504mobile : ios android
You can’t perform that action at this time.
0 commit comments