diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2018-01-04 17:21:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 17:21:12 +0300 |
commit | 689362c41c747b1c6b684ff76d5e321a5636978f (patch) | |
tree | 00ce07d84597bd46c7c74582ab4b0624aa92ee09 /src/System.Private.Reflection.Execution | |
parent | 330a63479becd05ae76a6adafbf69b8d9f75346d (diff) |
Add option to block all metadata in an assembly (#5199)
Adding an attribute type whose presence makes everything in an assembly reflection blocked.
This reduces the size of a Hello world by ~300 kB (50 kB in metadata blob and the rest are various runtime artifacts we no longer need).
If we evacuate public APIs out of System.Private.Interop and mark it fully blocked, we can get some more savings (e.g. the `bool IsComObject(Type type)` method marks `__ComObject` as reflectable (and constructed!) due to the ldtoken and there's no happiness in that).
Diffstat (limited to 'src/System.Private.Reflection.Execution')
-rw-r--r-- | src/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj b/src/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj index ae092647d..5b935ef32 100644 --- a/src/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj +++ b/src/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj @@ -125,8 +125,8 @@ <Compile Include="..\..\Common\src\System\Collections\Generic\Empty.cs" > <Link>System\Collections\Generic\Empty.cs</Link> </Compile> - <Compile Include="..\..\Common\src\System\Runtime\CompilerServices\__BlockReflectionAttribute.cs" Condition="'$(IsProjectNLibrary)' != 'true'"> - <Link>System\Runtime\CompilerServices\__BlockReflectionAttribute.cs</Link> + <Compile Include="..\..\Common\src\System\Runtime\CompilerServices\__BlockAllReflectionAttribute.cs" Condition="'$(IsProjectNLibrary)' != 'true'"> + <Link>System\Runtime\CompilerServices\__BlockAllReflectionAttribute.cs</Link> </Compile> </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> |