Skip to content

Commit 6981522

Browse files
committed
Revert "Support Google Play 16 KB Page Size Requirement (#13470)"
This reverts commit dc2c83c 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.
1 parent 33c8998 commit 6981522

File tree

6 files changed

+1
-25
lines changed

6 files changed

+1
-25
lines changed

Android.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
108108

109109
LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--no-undefined-version -Wl,--version-script=$(LOCAL_PATH)/src/dynapi/SDL_dynapi.sym
110110

111-
# https://developer.android.com/guide/practices/page-sizes
112-
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
113-
LOCAL_LDFLAGS += "-Wl,-z,common-page-size=16384"
114-
115111
ifeq ($(NDK_DEBUG),1)
116112
cmd-strip :=
117113
endif

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,11 +1512,6 @@ if(ANDROID)
15121512
endif()
15131513
endif()
15141514

1515-
if(TARGET SDL3-shared)
1516-
target_link_options(SDL3-shared PRIVATE "-Wl,-z,max-page-size=16384")
1517-
target_link_options(SDL3-shared PRIVATE "-Wl,-z,common-page-size=16384")
1518-
endif()
1519-
15201515
elseif(EMSCRIPTEN)
15211516
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
15221517
# project. Uncomment at will for verbose cross-compiling -I/../ path info.

android-project/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
abiFilters 'arm64-v8a'
2020
}
2121
cmake {
22-
arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static", "-DAPP_SUPPORT_FLEXIBLE_PAGE_SIZES=true"
22+
arguments "-DANDROID_PLATFORM=android-21", "-DANDROID_STL=c++_static"
2323
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
2424
abiFilters 'arm64-v8a'
2525
}

android-project/app/jni/Application.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
88

99
# Min runtime API level
1010
APP_PLATFORM=android-21
11-
12-
# https://developer.android.com/guide/practices/page-sizes#update-packaging
13-
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true

android-project/app/jni/src/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,4 @@ endif()
2626
add_library(main SHARED
2727
YourSourceHere.c
2828
)
29-
30-
#https://developer.android.com/guide/practices/page-sizes#update-packaging
31-
target_link_options(main PRIVATE "-Wl,-z,max-page-size=16384")
32-
target_link_options(main PRIVATE "-Wl,-z,common-page-size=16384")
33-
3429
target_link_libraries(main PRIVATE SDL3::SDL3)

build-scripts/androidbuildlibs.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
3030
obj=
3131
lib=
3232
ndk_args=
33-
flexpage=true
3433

3534
# Allow an external caller to specify locations and platform.
3635
while [ $# -gt 0 ]; do
@@ -43,8 +42,6 @@ while [ $# -gt 0 ]; do
4342
platform=${arg#APP_PLATFORM=}
4443
elif [ "${arg:0:8}" == "APP_ABI=" ]; then
4544
abi=${arg#APP_ABI=}
46-
elif [ "${arg:0:32}" == "APP_SUPPORT_FLEXIBLE_PAGE_SIZES=" ]; then
47-
flexpage=${arg#APP_SUPPORT_FLEXIBLE_PAGE_SIZES=}
4845
else
4946
ndk_args="$ndk_args $arg"
5047
fi
@@ -70,9 +67,6 @@ done
7067
# APP_* variables set in the environment here will not be seen by the
7168
# ndk-build makefile segments that use them, e.g., default-application.mk.
7269
# For consistency, pass all values on the command line.
73-
#
74-
# Add support for Google Play 16 KB Page size requirement:
75-
# https://developer.android.com/guide/practices/page-sizes#ndk-build
7670
ndk-build \
7771
NDK_PROJECT_PATH=null \
7872
NDK_OUT=$obj \
@@ -81,5 +75,4 @@ ndk-build \
8175
APP_ABI="$abi" \
8276
APP_PLATFORM="$platform" \
8377
APP_MODULES="SDL3" \
84-
APP_SUPPORT_FLEXIBLE_PAGE_SIZES="$flexpage" \
8578
$ndk_args

0 commit comments

Comments
 (0)