Define Debugger.IsSupported feature switch to allow trimming of debugger only code...
authorEric Erhardt <eric.erhardt@microsoft.com>
Fri, 10 Jul 2020 07:04:36 +0000 (02:04 -0500)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2020 07:04:36 +0000 (09:04 +0200)
src/libraries/Microsoft.CSharp/src/ILLinkTrim.xml
src/libraries/System.Linq/src/ILLinkTrim.xml
src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.Shared.xml

index 4260df0..25a8429 100644 (file)
@@ -1,10 +1,13 @@
 <linker>
   <assembly fullname="Microsoft.CSharp">
+    <!-- Required for COM event dispatch -->
+    <type fullname="System.Runtime.InteropServices.ComEventsSink"/>
+  </assembly>
+
+  <assembly fullname="Microsoft.CSharp" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="true" featuredefault="true">
     <!-- Required by the Expression Evaluator -->
     <type fullname="Microsoft.CSharp.RuntimeBinder.DynamicMetaObjectProviderDebugView"/>
     <!-- Required by the Expression Evaluator -->
     <type fullname="Microsoft.CSharp.RuntimeBinder.DynamicMetaObjectProviderDebugView/DynamicDebugViewEmptyException"/>
-    <!-- Required for COM event dispatch -->
-    <type fullname="System.Runtime.InteropServices.ComEventsSink"/>
   </assembly>
-</linker>
\ No newline at end of file
+</linker>
index a2e3201..a24078d 100644 (file)
@@ -1,8 +1,8 @@
 <linker>
-  <assembly fullname="System.Linq">
+  <assembly fullname="System.Linq" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="true" featuredefault="true">
     <!-- required by debugger, see comment in System/Linq/DebugView.cs -->
     <type fullname="System.Linq.SystemCore_EnumerableDebugView" />
     <type fullname="System.Linq.SystemCore_EnumerableDebugView`1" />
     <type fullname="System.Linq.SystemCore_EnumerableDebugViewEmptyException" />
   </assembly>
-</linker>
\ No newline at end of file
+</linker>
index aa0a42d..71c7c46 100644 (file)
@@ -4,7 +4,16 @@
       <!-- Internal API used by tests only. -->
       <method name="GetICUVersion" />
     </type>
-    <!-- Properties and methods used by a debugger. -->
+    <type fullname="System.Threading.ThreadPoolBoundHandle">
+      <!-- Workaround to keep .interfaceimpl even though this type
+             is not instantiated on unix:
+             https://github.com/mono/linker/pull/649 -->
+      <method name=".ctor" />
+    </type>
+  </assembly>
+  
+  <!-- Properties and methods used by a debugger. -->
+  <assembly fullname="System.Private.CoreLib" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="true" featuredefault="true">
     <type fullname="System.Threading.Tasks.Task">
       <property name="ParentForDebugger" />
       <property name="StateFlagsForDebugger" />
       <!-- Methods is used by VS Tasks Window. -->
       <method name="GetActiveTaskFromId" />
     </type>
-    <type fullname="System.Threading.ThreadPoolBoundHandle">
-      <!-- Workaround to keep .interfaceimpl even though this type
-             is not instantiated on unix:
-             https://github.com/mono/linker/pull/649 -->
-      <method name=".ctor" />
-    </type>
   </assembly>
 </linker>