Skip to content

Commit

Permalink
Strip the ILLinkTrim.xml file from System.Private.Xml
Browse files Browse the repository at this point in the history
The two methods being preserved in System.Private.Xml (CreateSqlReader and GenerateSerializer) are large, and are not necessary when linking a mobile app. These methods only need to be preserved when linking the shared framework. When a normal app is linked, the linker is able to figure out if the two methods are necessary.

Contributes to dotnet#35199
  • Loading branch information
eerhardt committed Apr 30, 2020
1 parent 0764d8c commit b773171
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eng/illink.targets
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<!-- keep types and members required by Debugger-related attributes -->
<ILLinkArgs>$(ILLinkArgs) -v true</ILLinkArgs>
<!-- don't remove the embedded root xml resource since ILLink may run again on the assembly -->
<ILLinkArgs>$(ILLinkArgs) --strip-descriptors false</ILLinkArgs>
<ILLinkArgs Condition="'$(ILLinkStripResources)' != 'true'">$(ILLinkArgs) --strip-descriptors false</ILLinkArgs>
<!-- ignore unresolved references -->
<ILLinkArgs>$(ILLinkArgs) --skip-unresolved true</ILLinkArgs>
<!-- keep interface implementations -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<NoWarn>$(NoWarn);CS1573;649;169;414</NoWarn>
<DefineConstants>$(DefineConstants);FEATURE_COMPILED_XSL</DefineConstants>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks>
<!-- The members in ILLinkTrim.xml are only necessary when linking the shared framework. -->
<ILLinkStripResources>true</ILLinkStripResources>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)System\Text\StringBuilderCache.cs"
Expand Down

0 comments on commit b773171

Please sign in to comment.