Skip to content

Commit 341fee4

Browse files
committed
try to make buildTransitive/Sentry.Native.targets easier to understand
1 parent b2473ab commit 341fee4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@
3333
<NativeLibrary Include="Gdi32.lib" />
3434
</ItemGroup>
3535

36-
<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and ('$(RuntimeIdentifier)' == 'linux-x64' or '$(RuntimeIdentifier)' == 'linux-musl-x64')">
36+
<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and '$(RuntimeIdentifier)' == 'linux-x64'">
3737
<DirectPInvoke Include="sentry-native" />
38-
<LinkerArg Include="-Wl,-Bstatic -Wl,--whole-archive -lunwind -Wl,--no-whole-archive -Wl,-Bdynamic" Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64'" />
39-
<NativeSystemLibrary Include="lzma" Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64'" />
40-
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\$(RuntimeIdentifier)\libsentry-native.a" />
38+
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\linux-x64\libsentry-native.a" />
39+
<!-- See: https://github.com/dotnet/runtime/issues/97414 -->
40+
<NativeSystemLibrary Include="curl" />
41+
</ItemGroup>
42+
43+
<ItemGroup Condition="'$(FrameworkSupportsNative)' == 'true' and '$(RuntimeIdentifier)' == 'linux-musl-x64'">
44+
<DirectPInvoke Include="sentry-native" />
45+
<!-- When musl is detected, static sentry-native links to static libunwind -->
46+
<LinkerArg Include="-Wl,-Bstatic -Wl,--whole-archive -lunwind -Wl,--no-whole-archive -Wl,-Bdynamic" />
47+
<NativeSystemLibrary Include="lzma" />
48+
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\sentry-native\linux-musl-x64\libsentry-native.a" />
4149
<!-- See: https://github.com/dotnet/runtime/issues/97414 -->
4250
<NativeSystemLibrary Include="curl" />
4351
</ItemGroup>

0 commit comments

Comments
 (0)