Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eerhardt opened this issue Jun 1, 2020 · 2 comments · Fixed by #37996
Closed

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

eerhardt opened this issue Jun 1, 2020 · 2 comments · Fixed by #37996
Assignees
Labels
area-Infrastructure-libraries linkable-framework Issues associated with delivering a linker friendly framework untriaged New issue has not been triaged by the area owner

Comments

@eerhardt
Copy link
Member

eerhardt commented Jun 1, 2020

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

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Infrastructure-libraries untriaged New issue has not been triaged by the area owner labels Jun 1, 2020
@ghost
Copy link

ghost commented Jun 1, 2020

Tagging subscribers to this area: @safern, @ViktorHofer
Notify danmosemsft if you want to be subscribed.

eerhardt added a commit to eerhardt/runtime that referenced this issue Jun 1, 2020
dotnet#36715 and dotnet#37083 modified the CoreCLR version of CoreLib's linker descriptor file, but left them in the Mono version.

dotnet#37255 will address sharing the duplicated parts of these files.
@eerhardt eerhardt added the linkable-framework Issues associated with delivering a linker friendly framework label Jun 1, 2020
@marek-safar
Copy link
Contributor

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

jkotas pushed a commit that referenced this issue Jun 1, 2020
#36715 and #37083 modified the CoreCLR version of CoreLib's linker descriptor file, but left them in the Mono version.

#37255 will address sharing the duplicated parts of these files.
@eerhardt eerhardt self-assigned this Jun 16, 2020
eerhardt added a commit to eerhardt/runtime that referenced this issue Jun 17, 2020
This reduces the duplication between these libraries, and allows for easier maintenance going forward.

Fix dotnet#37255
eerhardt added a commit that referenced this issue Jun 18, 2020
)

This reduces the duplication between these libraries, and allows for easier maintenance going forward.

Fix #37255
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries linkable-framework Issues associated with delivering a linker friendly framework untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants