Skip to content

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

Closed

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

  1. added
    untriaged
    on Jun 1, 2020
  2. added
    linkable-framework
    on Jun 1, 2020
  3. marek-safar commented on Jun 1, 2020

    @marek-safar
    Contributor

    I think the best goal would be to have no linker descriptor for the shared part and use attributes only.

  4. self-assigned this
    on Jun 16, 2020
  5. added a commit that references this issue on Jun 18, 2020
    c8095c9
  6. ghost locked as resolved and limited conversation to collaborators on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Infrastructure-librarieslinkable-frameworkuntriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions