Skip to content

Commit 1cf8a33

Browse files
authored
feat: support 16kb page size on Android 15 (#1028)
1 parent 131a1ee commit 1cf8a33

File tree

6 files changed

+24
-3
lines changed

6 files changed

+24
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
**Features**:
66

77
- Let the envelope serialization stream directly to the file. ([#1021](https://github.com/getsentry/sentry-native/pull/1021))
8+
- Support 16kb page sizes on Android 15 ([#1028](https://github.com/getsentry/sentry-native/pull/1028))
89

910
## 0.7.7
1011

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,4 +596,9 @@ endif()
596596
if(SENTRY_BUILD_SHARED_LIBS)
597597
target_link_libraries(sentry PRIVATE
598598
"$<$<OR:$<PLATFORM_ID:Linux>,$<PLATFORM_ID:Android>>:-Wl,--build-id=sha1,--version-script=${PROJECT_SOURCE_DIR}/src/exports.map>")
599+
600+
# Support 16KB page sizes
601+
target_link_libraries(sentry PRIVATE
602+
"$<$<PLATFORM_ID:Android>:-Wl,-z,max-page-size=16384>"
603+
)
599604
endif()

ndk/lib/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ set(SENTRY_BUILD_SHARED_LIBS ON)
1212
add_subdirectory(${SENTRY_NATIVE_SRC} sentry_build)
1313

1414
# Link to sentry-native
15-
target_link_libraries(sentry-android PRIVATE
16-
$<BUILD_INTERFACE:sentry::sentry>
17-
)
15+
target_link_libraries(sentry-android PRIVATE $<BUILD_INTERFACE:sentry::sentry>)
16+
17+
# Support 16KB page sizes
18+
target_link_options(sentry-android PRIVATE "-Wl,-z,max-page-size=16384")

ndk/lib/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ android {
8686
ignore = true
8787
}
8888
}
89+
90+
packagingOptions {
91+
jniLibs {
92+
useLegacyPackaging = true
93+
}
94+
}
8995
}
9096

9197
dependencies {

ndk/sample/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ target_link_libraries(ndk-sample PRIVATE
1616
${LOG_LIB}
1717
$<BUILD_INTERFACE:sentry::sentry>
1818
)
19+
# Support 16KB page sizes
20+
target_link_options(ndk-sample PRIVATE "-Wl,-z,max-page-size=16384")

ndk/sample/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ android {
6363
kotlinOptions {
6464
jvmTarget = JavaVersion.VERSION_1_8.toString()
6565
}
66+
packagingOptions {
67+
jniLibs {
68+
useLegacyPackaging = true
69+
}
70+
}
71+
ndkVersion = "27.0.12077973"
6672
}
6773

6874
dependencies {

0 commit comments

Comments
 (0)