diff --git a/CHANGELOG.md b/CHANGELOG.md index c7614952d..9eb799ee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Features**: - Let the envelope serialization stream directly to the file. ([#1021](https://github.com/getsentry/sentry-native/pull/1021)) +- Support 16kb page sizes on Android 15 ([#1028](https://github.com/getsentry/sentry-native/pull/1028)) ## 0.7.7 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4af1b8510..426bd0682 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -596,4 +596,9 @@ endif() if(SENTRY_BUILD_SHARED_LIBS) target_link_libraries(sentry PRIVATE "$<$,$>:-Wl,--build-id=sha1,--version-script=${PROJECT_SOURCE_DIR}/src/exports.map>") + + # Support 16KB page sizes + target_link_libraries(sentry PRIVATE + "$<$:-Wl,-z,max-page-size=16384>" + ) endif() diff --git a/ndk/lib/CMakeLists.txt b/ndk/lib/CMakeLists.txt index b9f8f4a4b..ff1471b35 100644 --- a/ndk/lib/CMakeLists.txt +++ b/ndk/lib/CMakeLists.txt @@ -12,6 +12,7 @@ set(SENTRY_BUILD_SHARED_LIBS ON) add_subdirectory(${SENTRY_NATIVE_SRC} sentry_build) # Link to sentry-native -target_link_libraries(sentry-android PRIVATE - $ -) +target_link_libraries(sentry-android PRIVATE $) + +# Support 16KB page sizes +target_link_options(sentry-android PRIVATE "-Wl,-z,max-page-size=16384") diff --git a/ndk/lib/build.gradle.kts b/ndk/lib/build.gradle.kts index 8e3600a59..3381b21b9 100644 --- a/ndk/lib/build.gradle.kts +++ b/ndk/lib/build.gradle.kts @@ -86,6 +86,12 @@ android { ignore = true } } + + packagingOptions { + jniLibs { + useLegacyPackaging = true + } + } } dependencies { diff --git a/ndk/sample/CMakeLists.txt b/ndk/sample/CMakeLists.txt index de05d5a02..10933b78c 100644 --- a/ndk/sample/CMakeLists.txt +++ b/ndk/sample/CMakeLists.txt @@ -16,3 +16,5 @@ target_link_libraries(ndk-sample PRIVATE ${LOG_LIB} $ ) +# Support 16KB page sizes +target_link_options(ndk-sample PRIVATE "-Wl,-z,max-page-size=16384") diff --git a/ndk/sample/build.gradle.kts b/ndk/sample/build.gradle.kts index 5390793df..2227fe1ea 100644 --- a/ndk/sample/build.gradle.kts +++ b/ndk/sample/build.gradle.kts @@ -63,6 +63,12 @@ android { kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() } + packagingOptions { + jniLibs { + useLegacyPackaging = true + } + } + ndkVersion = "27.0.12077973" } dependencies {