-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file #37996
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,68 +1,9 @@ | ||
| <linker> | ||
| <assembly fullname="System.Private.CoreLib"> | ||
| <type fullname="Interop/Globalization"> | ||
| <!-- Internal API used by tests only. --> | ||
| <method name="GetICUVersion" /> | ||
| </type> | ||
| <type fullname="System.GC"> | ||
| <!-- Methods are used to register and unregister frozen segments. They are private and experimental. --> | ||
| <method name="_RegisterFrozenSegment" /> | ||
| <method name="_UnregisterFrozenSegment" /> | ||
| </type> | ||
| <!-- 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> | ||
| <!-- 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.ComTypes.IEnumerator" /> | ||
| <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> | ||
| </assembly> | ||
| </linker> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,63 @@ | ||||||
| <linker> | ||||||
| <assembly fullname="System.Private.CoreLib"> | ||||||
| <type fullname="Interop/Globalization"> | ||||||
| <!-- Internal API used by tests only. --> | ||||||
| <method name="GetICUVersion" /> | ||||||
|
||||||
| [DllImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_GetICUVersion")] | |
| internal static extern int GetICUVersion(); |
I was thinking of just moving the P/Invoke to the tests.
But now that I look again, our Globalization.Native shim is replaced with QCall -- can you do that from an assembly outside of S.P.Corelib?
If not, then yes it could be moved to _LibraryBuild.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QCalls are for CoreLib-only.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -753,71 +753,10 @@ | |
| <method signature="System.Void .ctor()" /> | ||
|
||
| </type> | ||
|
|
||
| <!-- 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> | ||
| <!-- 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> | ||
| <!-- end of src/coreclr/src/System.Private.CoreLib/ILLinkTrim.xml --> | ||
|
|
||
| <!-- Used by binary formatter tests --> | ||
| <type fullname="System.Threading.ThreadStartException"> | ||
| <method name=".ctor" /> | ||
| </type> | ||
| <!-- Internal API used by System.Globalization tests --> | ||
| <type fullname="Interop/Globalization"> | ||
| <method name="GetICUVersion" /> | ||
| </type> | ||
| <type fullname="System.Runtime.InteropServices.Marshal"> | ||
| <!-- marshal-ilgen.c: emit_marshal_custom_get_instance --> | ||
| <method name="GetCustomMarshalerInstance" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is .Shared suffix necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It technically isn't necessary, but since
ILLink.Descriptors.xmlis the full name of the resource embedded in the assembly, I thought it would be confusing to someone who thought this was the full descriptor file. PuttingSharedin the file name qualifies it being the "shared" pieces, and not the full file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok