Skip to content

Commit

Permalink
feat: support 16kb page size on Android 15 (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus committed Aug 6, 2024
1 parent 131a1ee commit 1cf8a33
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -596,4 +596,9 @@ endif()
if(SENTRY_BUILD_SHARED_LIBS)
target_link_libraries(sentry PRIVATE
"$<$<OR:$<PLATFORM_ID:Linux>,$<PLATFORM_ID:Android>>:-Wl,--build-id=sha1,--version-script=${PROJECT_SOURCE_DIR}/src/exports.map>")

# Support 16KB page sizes
target_link_libraries(sentry PRIVATE
"$<$<PLATFORM_ID:Android>:-Wl,-z,max-page-size=16384>"
)
endif()
7 changes: 4 additions & 3 deletions ndk/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:sentry::sentry>
)
target_link_libraries(sentry-android PRIVATE $<BUILD_INTERFACE:sentry::sentry>)

# Support 16KB page sizes
target_link_options(sentry-android PRIVATE "-Wl,-z,max-page-size=16384")
6 changes: 6 additions & 0 deletions ndk/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ android {
ignore = true
}
}

packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
}

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions ndk/sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ target_link_libraries(ndk-sample PRIVATE
${LOG_LIB}
$<BUILD_INTERFACE:sentry::sentry>
)
# Support 16KB page sizes
target_link_options(ndk-sample PRIVATE "-Wl,-z,max-page-size=16384")
6 changes: 6 additions & 0 deletions ndk/sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
ndkVersion = "27.0.12077973"
}

dependencies {
Expand Down

0 comments on commit 1cf8a33

Please sign in to comment.