Skip to content

Commit 98512cc

Browse files
committed
depend on sentry-native
1 parent e7d93a5 commit 98512cc

File tree

6 files changed

+40
-7
lines changed

6 files changed

+40
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
### Unreleased
4+
5+
### Feature
6+
7+
- Support for Windows ARM64 with Native AOT ([#4187](https://github.com/getsentry/sentry-dotnet/pull/4187))
8+
39
## 5.7.0
410

511
### Features

integration-test/runtime.Tests.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ internal class FakeTransport : ITransport
4949
}
5050
elseif ($IsWindows)
5151
{
52-
return "./console-app/bin/Release/$framework/win-x64/publish/console-app.exe"
52+
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
53+
{
54+
return "./console-app/bin/Release/$framework/win-arm64/publish/console-app.exe"
55+
}
56+
else
57+
{
58+
return "./console-app/bin/Release/$framework/win-x64/publish/console-app.exe"
59+
}
5360
}
5461
else
5562
{

scripts/build-sentry-native.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,20 @@ try
2121
}
2222
elseif ($IsWindows)
2323
{
24-
$outDir += '/win-x64'
24+
# TODO: Blocked on: https://github.com/getsentry/sentry-native/issues/880
2525
$additionalArgs += @('-C', 'src/Sentry/Platforms/Native/windows-config.cmake')
2626
$actualBuildDir = "$buildDir/RelWithDebInfo"
2727
$libPrefix = ''
2828
$libExtension = '.lib'
29+
30+
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
31+
{
32+
$outDir += '/win-x64'
33+
}
34+
else
35+
{
36+
$outDir += '/win-arm64'
37+
}
2938
}
3039
elseif ($IsLinux)
3140
{

scripts/generate-solution-filters-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ filterConfigs:
101101
- "**/*Sentry.Maui.Device.TestApp.csproj"
102102
- "**/*Sentry.Samples.Android.csproj"
103103
- "**/*OpenTelemetry.AspNet.csproj"
104-
# Depends on LocalDb which is x64
104+
# Depends on LocalDb or SQLitePCL which are x64
105105
- "**/*Sentry.DiagnosticSource.IntegrationTests.csproj"
106+
- "**/*Sentry.DiagnosticSource.Tests.csproj"
106107
- "**/*Sentry.EntityFramework.Tests.csproj"
107108

108109
- outputPath: Sentry-CI-CodeQL.slnf

src/Sentry/Platforms/Native/Sentry.Native.targets

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
<!-- List of runtime identifiers: https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json -->
1010
<NativeLibRelativePath-win-x64>win-x64</NativeLibRelativePath-win-x64>
1111
<SentryNativeOutputDirectory-win-x64>$(SentryNativeOutputDirectory)$(NativeLibRelativePath-win-x64)\</SentryNativeOutputDirectory-win-x64>
12+
<NativeLibRelativePath-win-arm64>win-arm64</NativeLibRelativePath-win-arm64>
13+
<SentryNativeOutputDirectory-win-arm64>$(SentryNativeOutputDirectory)$(NativeLibRelativePath-win-arm64)\</SentryNativeOutputDirectory-win-arm64>
1214
<NativeLibRelativePath-linux-x64>linux-x64</NativeLibRelativePath-linux-x64>
1315
<SentryNativeOutputDirectory-linux-x64>$(SentryNativeOutputDirectory)$(NativeLibRelativePath-linux-x64)\</SentryNativeOutputDirectory-linux-x64>
1416
<NativeLibRelativePath-osx>osx</NativeLibRelativePath-osx>
1517
<SentryNativeOutputDirectory-osx>$(SentryNativeOutputDirectory)$(NativeLibRelativePath-osx)\</SentryNativeOutputDirectory-osx>
16-
<SentryNativeBuildOutputs Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib</SentryNativeBuildOutputs>
18+
<SentryNativeBuildOutputs Condition="'$(RuntimeIdentifier)' == 'win-x64'">$(SentryNativeOutputDirectory-win-x64)lib$(SentryNativeLibraryName).lib</SentryNativeBuildOutputs>
19+
<SentryNativeBuildOutputs Condition="'$(RuntimeIdentifier)' == 'win-arm64'">$(SentryNativeOutputDirectory-win-arm64)lib$(SentryNativeLibraryName).lib</SentryNativeBuildOutputs>
1720
<SentryNativeBuildOutputs Condition="$([MSBuild]::IsOsPlatform('Linux'))">$(SentryNativeOutputDirectory-linux-x64)lib$(SentryNativeLibraryName).a</SentryNativeBuildOutputs>
1821
<SentryNativeBuildOutputs Condition="$([MSBuild]::IsOsPlatform('OSX'))">$(SentryNativeOutputDirectory-osx)lib$(SentryNativeLibraryName).a</SentryNativeBuildOutputs>
1922
</PropertyGroup>
@@ -25,13 +28,20 @@
2528
</ItemGroup>
2629

2730
<!-- Packaging the native library -->
28-
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or $([MSBuild]::IsOsPlatform('Windows'))">
31+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'win-x64'">
2932
<None Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib">
3033
<Pack>true</Pack>
3134
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-x64)</PackagePath>
3235
</None>
3336
</ItemGroup>
3437

38+
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'win-arm64'">
39+
<None Include="$(SentryNativeOutputDirectory-win-arm64)$(SentryNativeLibraryName).lib">
40+
<Pack>true</Pack>
41+
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-arm64)</PackagePath>
42+
</None>
43+
</ItemGroup>
44+
3545
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or $([MSBuild]::IsOsPlatform('Linux'))">
3646
<None Include="$(SentryNativeOutputDirectory-linux-x64)lib$(SentryNativeLibraryName).a">
3747
<Pack>true</Pack>

src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
<FrameworkSupportsNative Condition="'$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'">false</FrameworkSupportsNative>
2626
</PropertyGroup>
2727

28-
<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and '$(RuntimeIdentifier)' == 'win-x64'">
28+
<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and ('$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64')">
2929
<DirectPInvoke Include="sentry-native" />
30-
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\win-x64\sentry-native.lib" />
30+
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\$(RuntimeIdentifier)\sentry-native.lib" />
3131
<NativeLibrary Include="dbghelp.lib" />
3232
<NativeLibrary Include="winhttp.lib" />
3333
<NativeLibrary Include="Gdi32.lib" />

0 commit comments

Comments
 (0)