File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
src/Sentry/Platforms/Native/buildTransitive Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1313 <!-- SentryNative.IsEnabled should result in compile-time constant for trimmed applications -->
1414 <!-- Effectively disabling native library -->
1515 <RuntimeHostConfigurationOption Include =" Sentry.Native.IsEnabled"
16- Condition =" '$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'"
17- Value =" false"
16+ Value =" $(_SentryNativeEnabled)"
1817 Trim =" true" />
1918 </ItemGroup >
2019
3231 <FrameworkSupportsNative Condition =" '$(SentryNative)' == 'false' or '$(SentryNative)' == 'disable'" >false</FrameworkSupportsNative >
3332 </PropertyGroup >
3433
34+ <!-- Whitelist supported runtimes -->
35+ <Choose >
36+ <When Condition =" '$(FrameworkSupportsNative)' == 'true'" >
37+ <PropertyGroup >
38+ <!-- Windows -->
39+ <_SentryNativeEnabled Condition =" '$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64'" >true</_SentryNativeEnabled >
40+ <!-- Linux -->
41+ <_SentryNativeEnabled Condition =" '$(RuntimeIdentifier)' == 'linux-x64' or '$(RuntimeIdentifier)' == 'linux-arm64' or '$(RuntimeIdentifier)' == 'linux-musl-x64'" >true</_SentryNativeEnabled >
42+ <!-- macOS -->
43+ <_SentryNativeEnabled Condition =" '$(RuntimeIdentifier)' == 'osx-x64' or '$(RuntimeIdentifier)' == 'osx-arm64'" >true</_SentryNativeEnabled >
44+ </PropertyGroup >
45+ </When >
46+ <Otherwise >
47+ <PropertyGroup >
48+ <_SentryNativeEnabled >false</_SentryNativeEnabled >
49+ </PropertyGroup >
50+ </Otherwise >
51+ </Choose >
52+
3553 <ItemGroup Condition =" '$(FrameworkSupportsNative)' == 'true' and ('$(RuntimeIdentifier)' == 'win-x64' or '$(RuntimeIdentifier)' == 'win-arm64')" >
3654 <DirectPInvoke Include =" sentry-native" />
3755 <NativeLibrary Include =" $(MSBuildThisFileDirectory)..\sentry-native\$(RuntimeIdentifier)\sentry-native.lib" />
You can’t perform that action at this time.
0 commit comments