Skip to content

Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file #37255

Description

@eerhardt

We have duplicate entries between CoreCLR and Mono CoreLib's linker descriptor files.

<!-- From src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml -->
<!-- Properties and methods used by a debugger. -->
<type fullname="System.Threading.Tasks.Task">
<property name="ParentForDebugger" />
<property name="StateFlagsForDebugger" />
<method name="GetDelegateContinuationsForDebugger" />
<method name="SetNotificationForWaitCompletion" />
</type>
<type fullname="System.Threading.ThreadPool">
<method name="GetQueuedWorkItemsForDebugger" />
<method name="GetGloballyQueuedWorkItemsForDebugger" />
<method name="GetLocallyQueuedWorkItemsForDebugger" />
</type>
<type fullname="System.Threading.Tasks.TaskScheduler">
<method name="GetScheduledTasksForDebugger" />
<method name="GetTaskSchedulersForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncMethodBuilderCore">
<method name="TryGetStateMachineForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncIteratorMethodBuilder">
<property name="ObjectIdForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncVoidMethodBuilder">
<property name="ObjectIdForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncTaskMethodBuilder*">
<property name="ObjectIdForDebugger" />
<method name="SetNotificationForWaitCompletion" />
</type>
<type fullname="System.Threading.Tasks.Task">
<!-- Methods is used by VS Tasks Window. -->
<method name="GetActiveTaskFromId" />
</type>
<type fullname="System.Collections.Generic.GenericArraySortHelper`1">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<type fullname="System.Collections.Generic.GenericArraySortHelper`2">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<!-- Accessed via private reflection by tracing controller. -->
<type fullname="System.Diagnostics.Tracing.EventPipe*" />
<!-- Accessed via private reflection and by native code. -->
<type fullname="System.Diagnostics.Tracing.RuntimeEventSource" />
<type fullname="System.Diagnostics.Tracing.NativeRuntimeEventSource" />
<!-- Accessed via reflection in TraceLogging-style EventSource events. -->
<type fullname="*f__AnonymousType*" />
<type fullname="System.Diagnostics.Tracing.PropertyValue/ReferenceTypeHelper`1">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<!-- Accessed via native code. -->
<type fullname="System.Runtime.InteropServices.ComTypes.IEnumerable" />
<type fullname="System.Runtime.InteropServices.CustomMarshalers.*" />
<!-- Accessed by the WinRT Host -->
<type fullname="Internal.Runtime.InteropServices.WindowsRuntime.ActivationFactoryLoader" />
<!-- Workaround for https://github.com/mono/linker/issues/378 -->
<type fullname="System.Runtime.InteropServices.IDispatch" />
<type fullname="Internal.Runtime.InteropServices.IClassFactory2" />
<type fullname="Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs" />
<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>
<!-- end of src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml -->

<!-- Properties and methods used by a debugger. -->
<type fullname="System.Threading.Tasks.Task">
<property name="ParentForDebugger" />
<property name="StateFlagsForDebugger" />
<method name="GetDelegateContinuationsForDebugger" />
<method name="SetNotificationForWaitCompletion" />
</type>
<type fullname="System.Threading.ThreadPool">
<method name="GetQueuedWorkItemsForDebugger" />
<method name="GetGloballyQueuedWorkItemsForDebugger" />
<method name="GetLocallyQueuedWorkItemsForDebugger" />
</type>
<type fullname="System.Threading.Tasks.TaskScheduler">
<method name="GetScheduledTasksForDebugger" />
<method name="GetTaskSchedulersForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncMethodBuilderCore">
<method name="TryGetStateMachineForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncIteratorMethodBuilder">
<property name="ObjectIdForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncVoidMethodBuilder">
<property name="ObjectIdForDebugger" />
</type>
<type fullname="System.Runtime.CompilerServices.AsyncTaskMethodBuilder*">
<property name="ObjectIdForDebugger" />
<method name="SetNotificationForWaitCompletion" />
</type>
<type fullname="System.Threading.Tasks.Task">
<!-- Methods is used by VS Tasks Window. -->
<method name="GetActiveTaskFromId" />
</type>
<type fullname="System.Collections.Generic.GenericArraySortHelper`1">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<type fullname="System.Collections.Generic.GenericArraySortHelper`2">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<!-- Accessed via private reflection by tracing controller. -->
<type fullname="System.Diagnostics.Tracing.EventPipe*" />
<!-- Accessed via private reflection and by native code. -->
<type fullname="System.Diagnostics.Tracing.RuntimeEventSource" />
<type fullname="System.Diagnostics.Tracing.NativeRuntimeEventSource" />
<type fullname="System.Diagnostics.Tracing.PropertyValue/ReferenceTypeHelper`1">
<!-- Instantiated via reflection -->
<method name=".ctor" />
</type>
<!-- Accessed via native code. -->
<type fullname="System.Runtime.InteropServices.ComTypes.IEnumerable" />
<type fullname="System.Runtime.InteropServices.CustomMarshalers.*" />
<!-- Workaround for https://github.com/mono/linker/issues/378 -->
<type fullname="System.Runtime.InteropServices.IDispatch" />
<type fullname="Internal.Runtime.InteropServices.IClassFactory2" />
<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>

What's worse is that they are now getting out of sync. #36715 and #37083 have modified the CoreCLR version, but didn't modify the Mono version.

We should find a way to have this list in one place (probably under src/libraries/System.Private.CoreLib) and use it in both projects.

cc @joperezr

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions