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

Single Linker config for .NET Native and Mono #57

Closed
clairernovotny opened this issue Apr 4, 2017 · 2 comments
Closed

Single Linker config for .NET Native and Mono #57

clairernovotny opened this issue Apr 4, 2017 · 2 comments
Labels

Comments

@clairernovotny
Copy link
Member

I fully support the idea of a linker in .NET Core but please consolidate the linker directives. There's rd.xml for .NET Native and this new thing. Please pick one and use it for both toolchains. Otherwise we'll need to duplicate linker directives and that's going to lead to errors.

@hrumhurum
Copy link

hrumhurum commented Dec 14, 2018

Please strongly consider to consolidate the formats.

Just hit a project where a set of .NET Standard libraries were both used in Xamarin and UWP hosts. UWP was a breathe thanks to RD.XML and its ability to be embedded right in the library.

Xamarin experience was considerably worse as I had to specify the same rules, but this time at the central location which is a linker description file. Did not like it at all, especially given the fact that some .NET Standard libraries are authored by another teams and its their responsibility to make them linker friendly, not mine.

RD.XML file format support in .NET Linker is highly welcome. This would eliminate the sharp edges and unpleasant dichotomy we currently have. Especially given the fact that .NET Linker now targets .NET Core.

@vitek-karas
Copy link
Member

The plan is to teach NativeAOT about the linker format - it actually already does some of this, main part of the missing work is tracked here: dotnet/runtime#73083

Going forward the recommendation for libraries/apps is to not use the XML files but instead use code. So either (in recommendation priority order):

  • direct references
  • use source generators to produce direct references
  • annotated reflection code with DynamicallyAccessedMembersAttribute
  • use DynamicDependencyAttribute (this is basically a code replacement for the descriptor XML file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants