Skip to content

Commit d1e7392

Browse files
Support 16 KB page sizes on Android - libsentrysupplemental.so (#3723)
1 parent cdbec91 commit d1e7392

File tree

9 files changed

+15
-7
lines changed

9 files changed

+15
-7
lines changed

.github/actions/environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ runs:
4444
dotnet workload install \
4545
wasm-tools wasm-tools-net8 maui-android \
4646
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows macos' || '' }} \
47-
${{ runner.os == 'Windows' && 'maui-windows' || '' }} \
47+
${{ runner.os == 'Windows' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
4848
--temp-dir "${{ runner.temp }}" \
4949
--skip-sign-check

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
### Features
1717
- Added support for `.NET 9` (preview) ([#3699](https://github.com/getsentry/sentry-dotnet/pull/3699))
18+
- libsentrysupplemental.so now supports 16 KB page sizes on Android ([#3723](https://github.com/getsentry/sentry-dotnet/pull/3723))
1819

1920
## Unreleased
2021

lib/sentrysupplemental/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ project(sentrysupplemental LANGUAGES C)
33

44
add_library(sentrysupplemental SHARED sentrysupplemental.c)
55

6+
# Set alignment to 16 KB. See https://developer.android.com/guide/practices/page-sizes#cmake
7+
target_link_options(sentrysupplemental PRIVATE "-Wl,-z,max-page-size=16384")
8+
69
set(LIBRARY_OUTPUT_PATH ../../bin/${ANDROID_ABI})
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

samples/Sentry.Samples.Maui/App.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ public partial class App
55
public App()
66
{
77
InitializeComponent();
8+
}
89

9-
MainPage = new AppShell();
10+
protected override Window CreateWindow(IActivationState activationState)
11+
{
12+
Windows[0].Page = new AppShell();
13+
return base.CreateWindow(activationState);
1014
}
1115
}

samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
On Mac, we'll also build for iOS and MacCatalyst.
77
On Windows, we'll also build for Windows 10.
88
-->
9-
<TargetFrameworks>$(TargetFrameworks);net8.0-android</TargetFrameworks>
10-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
11-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
9+
<TargetFrameworks>$(TargetFrameworks);net9.0-android</TargetFrameworks>
10+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
11+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
1212
<OutputType>Exe</OutputType>
1313
<RootNamespace>Sentry.Samples.Maui</RootNamespace>
1414
<UseMaui>true</UseMaui>
@@ -29,8 +29,8 @@
2929
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
3030
<ApplicationVersion>1</ApplicationVersion>
3131

32-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
33-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
32+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">12.2</SupportedOSPlatformVersion>
33+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
3434
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
3535
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
3636
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>

0 commit comments

Comments
 (0)