-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
area-NativeAOT-coreclr.NET runtime optimized for ahead of time compilation.NET runtime optimized for ahead of time compilationquestionFurther information is requestedFurther information is requested
Description
I was trying out nativeAOT following this guide but I'm using a new empty .NET 5 dll project. The output size were 4.5mb for literally NO code at all.
Then I was trying to add some lines:
<PropertyGroup>
<IlcDisableReflection>true</IlcDisableReflection>
<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<IlcDisableUnhandledExceptionExperience>true</IlcDisableUnhandledExceptionExperience>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
</PropertyGroup>This reduced the size from 4.5mb to 1mb. But imagine that its an empty project, it's still waaaaay too big. With C++ or Pascal I'm within 100kb area.
Is there more I can do to reduce the size or is it expected to be 10 times larger than other AOT compilers?
Metadata
Metadata
Assignees
Labels
area-NativeAOT-coreclr.NET runtime optimized for ahead of time compilation.NET runtime optimized for ahead of time compilationquestionFurther information is requestedFurther information is requested