Browse Source

Revert "Support Google Play 16 KB Page Size Requirement (#13470)"

This reverts commit dc2c83c3834f4eaa64698cc19cc80a3f21105e57

If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
Sam Lantinga 1 month ago
parent
commit
6981522cd6

+ 0 - 4
Android.mk

@@ -108,10 +108,6 @@ LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
 
 
 LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--no-undefined-version -Wl,--version-script=$(LOCAL_PATH)/src/dynapi/SDL_dynapi.sym
 LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--no-undefined-version -Wl,--version-script=$(LOCAL_PATH)/src/dynapi/SDL_dynapi.sym
 
 
-# https://developer.android.com/guide/practices/page-sizes
-LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
-LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
-
 ifeq ($(NDK_DEBUG),1)
 ifeq ($(NDK_DEBUG),1)
     cmd-strip :=
     cmd-strip :=
 endif
 endif

+ 0 - 5
CMakeLists.txt

@@ -1512,11 +1512,6 @@ if(ANDROID)
     endif()
     endif()
   endif()
   endif()
 
 
-if(TARGET SDL3-shared)
-  target_link_options(SDL3-shared PRIVATE "-Wl,-z,max-page-size=16384")
-  target_link_options(SDL3-shared PRIVATE "-Wl,-z,common-page-size=16384")
-endif()
-
 elseif(EMSCRIPTEN)
 elseif(EMSCRIPTEN)
   # Hide noisy warnings that intend to aid mostly during initial stages of porting a new
   # Hide noisy warnings that intend to aid mostly during initial stages of porting a new
   # project. Uncomment at will for verbose cross-compiling -I/../ path info.
   # project. Uncomment at will for verbose cross-compiling -I/../ path info.

+ 1 - 1
android-project/app/build.gradle

@@ -19,7 +19,7 @@ android {
                 abiFilters 'arm64-v8a'
                 abiFilters 'arm64-v8a'
             }
             }
             cmake {
             cmake {
-                arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static", "-DAPP_SUPPORT_FLEXIBLE_PAGE_SIZES=true"
+                arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static"
                 // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
                 // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
                 abiFilters 'arm64-v8a'
                 abiFilters 'arm64-v8a'
             }
             }

+ 0 - 3
android-project/app/jni/Application.mk

@@ -8,6 +8,3 @@ APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
 
 
 # Min runtime API level
 # Min runtime API level
 APP_PLATFORM=android-21
 APP_PLATFORM=android-21
-
-# https://developer.android.com/guide/practices/page-sizes#update-packaging
-APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true

+ 0 - 5
android-project/app/jni/src/CMakeLists.txt

@@ -26,9 +26,4 @@ endif()
 add_library(main SHARED
 add_library(main SHARED
     YourSourceHere.c
     YourSourceHere.c
 )
 )
-
-#https://developer.android.com/guide/practices/page-sizes#update-packaging
-target_link_options(main PRIVATE "-Wl,-z,max-page-size=16384")
-target_link_options(main PRIVATE "-Wl,-z,common-page-size=16384")
-
 target_link_libraries(main PRIVATE SDL3::SDL3)
 target_link_libraries(main PRIVATE SDL3::SDL3)

+ 0 - 7
build-scripts/androidbuildlibs.sh

@@ -30,7 +30,6 @@ abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
 obj=
 obj=
 lib=
 lib=
 ndk_args=
 ndk_args=
-flexpage=true
 
 
 # Allow an external caller to specify locations and platform.
 # Allow an external caller to specify locations and platform.
 while [ $# -gt 0 ]; do
 while [ $# -gt 0 ]; do
@@ -43,8 +42,6 @@ while [ $# -gt 0 ]; do
         platform=${arg#APP_PLATFORM=}
         platform=${arg#APP_PLATFORM=}
     elif [ "${arg:0:8}" == "APP_ABI=" ]; then
     elif [ "${arg:0:8}" == "APP_ABI=" ]; then
         abi=${arg#APP_ABI=}
         abi=${arg#APP_ABI=}
-    elif [ "${arg:0:32}" == "APP_SUPPORT_FLEXIBLE_PAGE_SIZES=" ]; then
-        flexpage=${arg#APP_SUPPORT_FLEXIBLE_PAGE_SIZES=}
     else
     else
         ndk_args="$ndk_args $arg"
         ndk_args="$ndk_args $arg"
     fi
     fi
@@ -70,9 +67,6 @@ done
 # APP_* variables set in the environment here will not be seen by the
 # APP_* variables set in the environment here will not be seen by the
 # ndk-build makefile segments that use them, e.g., default-application.mk.
 # ndk-build makefile segments that use them, e.g., default-application.mk.
 # For consistency, pass all values on the command line.
 # For consistency, pass all values on the command line.
-#
-# Add support for Google Play 16 KB Page size requirement:
-# https://developer.android.com/guide/practices/page-sizes#ndk-build
 ndk-build \
 ndk-build \
     NDK_PROJECT_PATH=null \
     NDK_PROJECT_PATH=null \
     NDK_OUT=$obj \
     NDK_OUT=$obj \
@@ -81,5 +75,4 @@ ndk-build \
     APP_ABI="$abi" \
     APP_ABI="$abi" \
     APP_PLATFORM="$platform" \
     APP_PLATFORM="$platform" \
     APP_MODULES="SDL3" \
     APP_MODULES="SDL3" \
-    APP_SUPPORT_FLEXIBLE_PAGE_SIZES="$flexpage" \
     $ndk_args
     $ndk_args