Skip to content

Commit

Permalink
Enable trimming for crossgen2 publishing and fix symbol bug (#91135)
Browse files Browse the repository at this point in the history
  • Loading branch information
agocke authored and eduardo-vp committed May 4, 2024
1 parent 5be6aa5 commit 6dd4480
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/coreclr/tools/aot/crossgen2/crossgen2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
<NativeAotSupported Condition="$(OutputRID.StartsWith('tizen')) == 'true'">false</NativeAotSupported>
<!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
<PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers>
<SelfContained>false</SelfContained>
Expand Down Expand Up @@ -39,8 +38,8 @@
<IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<!-- Use .dwarf files instead of .dsym files since our symbol exporting may not safely handle folders. -->
<NativeSymbolExt>.dwarf</NativeSymbolExt>
<DsymUtilOptions>--flat</DsymUtilOptions>
<NativeSymbolExt Condition="'$(_IsApplePlatform)' == 'true'">.dwarf</NativeSymbolExt>
<DsymUtilOptions Condition="'$(_IsApplePlatform)' == 'true'">--flat</DsymUtilOptions>
</PropertyGroup>

<ItemGroup Condition="'$(NativeAotSupported)' == 'true'">
Expand Down

0 comments on commit 6dd4480

Please sign in to comment.