Skip to content

Commit

Permalink
Add NativeAOT size and experimentation options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Dec 1, 2023
1 parent c4180b2 commit b12a24c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tests/AuthoringTest/AuthoringTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64;x86</Platforms>
<CsWinRTComponent>true</CsWinRTComponent>
<IsTrimmable>true</IsTrimmable>
<IsAotCompatible>true</IsAotCompatible>
<!-- CsWinRTEnableLogging helps to diagnose generation issues -->
<!-- <CsWinRTEnableLogging>true</CsWinRTEnableLogging> -->
<!--<CsWinRTKeepGeneratedSources>true</CsWinRTKeepGeneratedSources>-->
Expand Down
15 changes: 14 additions & 1 deletion src/Tests/AuthoringTest/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,21 @@
it we can also further validate that the self-contained authoring scenario works correctly
-->
<PropertyGroup Condition="'$(Configuration)' == 'Release' and '$(Platform)' == 'x64'">
<IsAotCompatible>true</IsAotCompatible>
<PublishAot>true</PublishAot>

<!-- General .NET and NativeAOT size saving options -->
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<InvariantGlobalization>true</InvariantGlobalization>
<OptimizationPreference>Size</OptimizationPreference>
<StackTraceSupport>false</StackTraceSupport>

<!-- Unsupported size saving options, can be experimented with to investigate binary size -->
<IlcFoldIdenticalMethodBodies>false</IlcFoldIdenticalMethodBodies>
<IlcDisableReflection>false</IlcDisableReflection>

<!-- Enable generating files to inspect the binary size with sizoscope (https://github.com/MichalStrehovsky/sizoscope) -->
<IlcGenerateMstatFile>true</IlcGenerateMstatFile>
<IlcGenerateDgmlFile>true</IlcGenerateDgmlFile>
</PropertyGroup>

</Project>

0 comments on commit b12a24c

Please sign in to comment.