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 #37996

Merged
merged 1 commit into from
Jun 18, 2020

Conversation

eerhardt
Copy link
Member

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

Fix #37255

@ghost
Copy link

ghost commented Jun 16, 2020

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

@ghost
Copy link

ghost commented Jun 16, 2020

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

@@ -0,0 +1,63 @@
<linker>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .Shared suffix necessary?

Copy link
Member Author

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.xml is 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. Putting Shared in the file name qualifies it being the "shared" pieces, and not the full file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -753,71 +753,10 @@
<method signature="System.Void .ctor()" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also rename the file to ILLink.Descriptors.xml ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to do that as part of #37651.

<assembly fullname="System.Private.CoreLib">
<type fullname="Interop/Globalization">
<!-- Internal API used by tests only. -->
<method name="GetICUVersion" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate from this PR, if this is only used by tests, can it be part of _LibraryBuild file instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at this yesterday,

[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.

Copy link
Member

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.

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

Fix dotnet#37255
@eerhardt eerhardt force-pushed the CombineSPCILLinkTrim branch from 5c19ef7 to f50bc09 Compare June 17, 2020 22:58
@eerhardt eerhardt merged commit c8095c9 into dotnet:master Jun 18, 2020
@eerhardt eerhardt deleted the CombineSPCILLinkTrim branch June 18, 2020 04:43
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file
5 participants