Skip to content

Commit

Permalink
Make it possible to build with AOT
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed May 21, 2024
1 parent d5da3f2 commit 1e01a1c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
13 changes: 13 additions & 0 deletions sizoscope/ILLink.Descriptors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<linker>
<assembly fullname="mscorlib">
<type fullname="System.Object" />
</assembly>
<assembly fullname="System.Resources.Extensions">
<type fullname="System.Resources.Extensions.DeserializingResourceReader" />
<type fullname="System.Resources.Extensions.RuntimeResourceSet" />
<type fullname="System.Resources.Extensions.UnknownType" />
</assembly>
<assembly fullname="System.Windows.Forms">
<type fullname="System.Windows.Forms.ImageListStreamer" />
</assembly>
</linker>
20 changes: 19 additions & 1 deletion sizoscope/sizoscope.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,25 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<TargetFramework>net9.0-windows7.0</TargetFramework>
<RollForward>Major</RollForward>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>icon.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version Condition="'$(Version)' == ''">42.42.42.42</Version>

<_SuppressWinFormsTrimError>true</_SuppressWinFormsTrimError>

<XmlResolverIsNetworkingEnabledByDefault>false</XmlResolverIsNetworkingEnabledByDefault>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
<OptimizationPreference>Size</OptimizationPreference>
<InvariantGlobalization>true</InvariantGlobalization>
<StackTraceSupport>false</StackTraceSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<CustomResourceTypesSupport>true</CustomResourceTypesSupport>

<PackAsTool>true</PackAsTool>
<Authors>Michal Strehovsky</Authors>
<Company>Michal Strehovsky</Company>
Expand All @@ -19,6 +30,13 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<!-- We really should introduce a first class property for this -->
<RuntimeHostConfigurationOption Include="System.Windows.Forms.PictureBox.UseWebRequest" Value="false" Trim="true" />

<TrimmerRootDescriptor Include="ILLink.Descriptors.xml" />
</ItemGroup>

<!-- HACK to allow packing as a .NET tool: https://github.com/dotnet/sdk/issues/16361 -->
<Target Name="HackBeforePackToolValidation" BeforeTargets="_PackToolValidation">
<PropertyGroup>
Expand Down

0 comments on commit 1e01a1c

Please sign in to comment.