gopenpgp
gopenpgp copied to clipboard
Support 16kb page size in gomobile builds
Hello,
since recently it's possible to compile for 16kb memory page size Android devices.
I am building gopenpgp for Android using the build.sh and I am trying to figure out how to modify it according to Google tips here: https://source.android.com/docs/core/architecture/16kb-page-size/16kb#build-lib-16kb-alignment
I tried modyfing
./gomobile bind -tags $TAGS -target $TARGET $JAVAPKG_FLAG -x -ldflags="-s -w " -o ${TARGET_OUT_FILE} ${PACKAGES}
in the build.sh by adding flags
-ldflags="-s -w -Wl -z max-page-size=16384"
but got: flag provided but not defined: -Wl error when building.
I suspect it may be because I use older NDK (23) and the linker does not know the flags, but when trying with the latest (27) I have:
./gomobile: no usable NDK: unsupported API version 16 (not in 21..35)
not sure what else to try. Can you help? This applies to both v2 and v3 lirabry.