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
Original file line number Diff line number Diff line change 378378 and transitioning the documentation to focus on a more reliable "Simnet"
379379 workflow while removing obsolete faucet references.
380380
381+ * [ Android Lndmobile 16 KB page size for native libraries] ( https://github.com/lightningnetwork/lnd/pull/10517 )
382+ The Android ` Lndmobile.aar ` build now passes ` -Wl,-z,max-page-size=16384 ` to
383+ the linker, keeping the generated native library compatible with newer
384+ Android devices that use 16 KB memory pages while preserving compatibility
385+ with existing 4 KB page-size devices.
386+
381387# Contributors (Alphabetical Order)
382388
383389* bitromortac
You can’t perform that action at this time.
0 commit comments