From 8fead7b8eb78ee0f30ce153c1964003c6a04927e Mon Sep 17 00:00:00 2001 From: Steven Moreland <45954464+smore-lore@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:46:22 -0700 Subject: [PATCH 1/4] gradle: add max-page-size 16384 This uses Gradle 7, so must specify page size exactly, rather than being able to use the newer options. This may not update the APK alignment, but you can always run zipalign to realign an unaligned APK. Or, if you pull the .so directly it will work. --- android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/android/build.gradle b/android/build.gradle index e02dcfa32..0fc26e68f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -60,6 +60,7 @@ if (androidSdkInstalled) { "-DBORINGSSL_HOME=$boringsslHome", "-DCMAKE_CXX_STANDARD=17" cFlags '-fvisibility=hidden', + '-Wl,-z,max-page-size=16384', '-DBORINGSSL_SHARED_LIBRARY', '-DBORINGSSL_IMPLEMENTATION', '-DOPENSSL_SMALL', From 7f45a516983b5f901a02b45fdce46856cc658b0c Mon Sep 17 00:00:00 2001 From: Steven Moreland <45954464+smore-lore@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:33:21 -0700 Subject: [PATCH 2/4] Update build.gradle --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0fc26e68f..758dd0087 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -60,12 +60,12 @@ if (androidSdkInstalled) { "-DBORINGSSL_HOME=$boringsslHome", "-DCMAKE_CXX_STANDARD=17" cFlags '-fvisibility=hidden', - '-Wl,-z,max-page-size=16384', '-DBORINGSSL_SHARED_LIBRARY', '-DBORINGSSL_IMPLEMENTATION', '-DOPENSSL_SMALL', '-D_XOPEN_SOURCE=700', - '-Wno-unused-parameter' + '-Wno-unused-parameter', + '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=16384' targets 'conscrypt_jni' version androidCmakeVersion } From 74151ed6910db44b1e3904b10e610a48bfa161d9 Mon Sep 17 00:00:00 2001 From: Pete Bentley <44170157+prbprbprb@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:38:59 +0100 Subject: [PATCH 3/4] Update build.gradle --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 758dd0087..1b6d2a6f5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -65,7 +65,7 @@ if (androidSdkInstalled) { '-DOPENSSL_SMALL', '-D_XOPEN_SOURCE=700', '-Wno-unused-parameter', - '-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=16384' + '-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384' targets 'conscrypt_jni' version androidCmakeVersion } From a1b877d06f98b6d976f076d23fa07ae573302bef Mon Sep 17 00:00:00 2001 From: Pete Bentley <44170157+prbprbprb@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:42:03 +0100 Subject: [PATCH 4/4] Update build.gradle --- android/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 1b6d2a6f5..b30c808ad 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -58,14 +58,14 @@ if (androidSdkInstalled) { arguments '-DANDROID=True', '-DANDROID_STL=c++_static', "-DBORINGSSL_HOME=$boringsslHome", - "-DCMAKE_CXX_STANDARD=17" + "-DCMAKE_CXX_STANDARD=17", + '-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384' cFlags '-fvisibility=hidden', '-DBORINGSSL_SHARED_LIBRARY', '-DBORINGSSL_IMPLEMENTATION', '-DOPENSSL_SMALL', '-D_XOPEN_SOURCE=700', - '-Wno-unused-parameter', - '-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384' + '-Wno-unused-parameter' targets 'conscrypt_jni' version androidCmakeVersion }