-
Notifications
You must be signed in to change notification settings - Fork 518
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
Use the .NET 8 linker only for .NET 8 #16125
Labels
dotnet
An issue or pull request related to .NET (6)
dotnet-external-dependency
.NET: this issue/pull request is blocked on external work
dotnet-pri0
.NET 6: required for stable release
Milestone
Comments
rolfbjarne
added a commit
to rolfbjarne/xamarin-macios
that referenced
this issue
Sep 26, 2022
… isn't set. The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: xamarin#16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.
vs-mobiletools-engineering-service2
pushed a commit
to vs-mobiletools-engineering-service2/xamarin-macios
that referenced
this issue
Sep 26, 2022
… isn't set. The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: xamarin#16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.
vs-mobiletools-engineering-service2
pushed a commit
to vs-mobiletools-engineering-service2/xamarin-macios
that referenced
this issue
Sep 26, 2022
… isn't set. The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: xamarin#16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.
dalexsoto
pushed a commit
that referenced
this issue
Sep 26, 2022
…tAction isn't set. (#16130) The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: #16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047. Backport of #16126 Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
rolfbjarne
added a commit
that referenced
this issue
Sep 27, 2022
… isn't set. (#16126) The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: #16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047.
rolfbjarne
added a commit
that referenced
this issue
Sep 27, 2022
…merDefaultAction isn't set. (#16129) The .NET 7 linker targets will set _TrimmerDefaultAction instead of TrimmerDefaultAction, so if TrimmerDefaultAction isn't set (which it will be for .NET 6), then use _TrimmerDefaultAction (which should be set for .NET 7). Unfortunately for .NET 8 it seems I've misplaced my crystal ball, so we'll have to wait a bit to see what happens then. Ref: #16125. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047. Backport of #16126 Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This should be address in linker with dotnet/linker#3029 |
This has been addressed in the linker. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
dotnet
An issue or pull request related to .NET (6)
dotnet-external-dependency
.NET: this issue/pull request is blocked on external work
dotnet-pri0
.NET 6: required for stable release
Currently .NET's linker is implemented so that if you're using .NET 7 to build a project, you'll get the .NET 7 linker, even if the project is building for .NET 6 (say using the
net6.0-ios
TargetFramework).This is unfortunate for a couple of reasons:
xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets
Lines 307 to 370 in 0a78bba
This leads to bugs when the linker's internals changes in .NET 7, and we're still using poking logic from .NET 6 (because we still haven't invented a time machine). Example: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1621047?src=WorkItemMention&src-action=artifact_link
I believe Android found an issue with the .NET 7 linker as well (iirc Cecil fixed a bug that turned out to not be backwards bug-compatible).
The fix seems easy: we should look into whether the linker can be used from the target .NET version (i.e. when building a
net6.0-ios
app use the .NET 6 linker). This is something the linker/runtime team should do, so this issue is just a tracking issue for our side.The text was updated successfully, but these errors were encountered: