diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-05-25 08:21:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 08:21:32 +0300 |
commit | e6c88a6a16e23fb3bffb16c62819ce6fdbecf15e (patch) | |
tree | ca9cc1f37407e9fc0c825ee3431ef70cc406f011 /src/System.Private.DeveloperExperience.Console | |
parent | 05b6578006269d140764b30239205be34733a7ba (diff) |
Enable reflection blocking (#3685)
Reflection blocking is a size on disk optimization that prevents
generating native metadata for things that are considered
private implementation details of the runtime.
Since CoreRT is compiled ahead of time, a lot of things that
would be needed by a full VM (method names, custom attributes, etc.)
are no longer necessary at runtime. Metadata is strictly only necessary
to support reflection at runtime.
The policy I'm implementing is to consider everything private in our
implementation assemblies to be reflection blocked.
What this entails:
* Adding support for computing reflection blocked state in the compiler
* Tweak to blocking policy to allow us to express blocking state of MethodImpls
* Uncomment blocking table mapping table scanning (this broke the PInvoke test for CppCodegen and we needed a workaround)
* Opt in private assemblies to reflection blocking
Diffstat (limited to 'src/System.Private.DeveloperExperience.Console')
-rw-r--r-- | src/System.Private.DeveloperExperience.Console/src/System.Private.DeveloperExperience.Console.csproj | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/System.Private.DeveloperExperience.Console/src/System.Private.DeveloperExperience.Console.csproj b/src/System.Private.DeveloperExperience.Console/src/System.Private.DeveloperExperience.Console.csproj index cb2037028..63e8a67c2 100644 --- a/src/System.Private.DeveloperExperience.Console/src/System.Private.DeveloperExperience.Console.csproj +++ b/src/System.Private.DeveloperExperience.Console/src/System.Private.DeveloperExperience.Console.csproj @@ -34,6 +34,9 @@ <Compile Include="Internal\DeveloperExperience\DeveloperExperienceConnector.cs" /> <Compile Include="Internal\DeveloperExperience\DeveloperExperienceConsole.cs" /> <Compile Include="Internal\Runtime\CompilerHelpers\LibraryInitializer.cs" /> + <Compile Include="..\..\Common\src\System\Runtime\CompilerServices\__BlockReflectionAttribute.cs" Condition="'$(IsProjectNLibrary)' != 'true'"> + <Link>System\Runtime\CompilerServices\__BlockReflectionAttribute.cs</Link> + </Compile> </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> |