Skip to content

[net10.0] fix NativeAOT support for iOS/Catalyst#27407

Merged
rmarinho merged 1 commit intonet10.0from
dev/peppers/ios/nativeaot
Jan 28, 2025
Merged

[net10.0] fix NativeAOT support for iOS/Catalyst#27407
rmarinho merged 1 commit intonet10.0from
dev/peppers/ios/nativeaot

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Jan 28, 2025

Context: dotnet/macios#22065

The introduction of a new $(MobileAggressiveAttributeTrimming) MSBuild property in .NET 10 breaks NativeAOT builds in two ways:

  • C# attributes are stripped away by ILLink, hence:

  • Trimmer warnings are introduced.

  • App crashes can result, with IL removed that shouldn't be.

Let's set $(MobileAggressiveAttributeTrimming) to false for now to avoid these issues.

In a future PR, we can address dotnet/macios#22065 in the iOS workload.

Context: dotnet/macios#22065

The introduction of a new `$(MobileAggressiveAttributeTrimming)`
MSBuild property in .NET 10 breaks NativeAOT builds in two ways:

* C# attributes are stripped away by ILLink, hence:

* Trimmer warnings are introduced.

* App crashes can result, with IL removed that *shouldn't* be.

Let's set `$(MobileAggressiveAttributeTrimming)` to `false` for now
to avoid these issues.

In a future PR, we can address xamarin-macios#22065 in the iOS workload.
@jonathanpeppers
Copy link
Member Author

@jonathanpeppers
Copy link
Member Author

NativeAOT tests are looking OK on the manual run:

image

@jonathanpeppers jonathanpeppers marked this pull request as ready for review January 28, 2025 20:36
Copilot AI review requested due to automatic review settings January 28, 2025 20:36
@jonathanpeppers jonathanpeppers requested a review from a team as a code owner January 28, 2025 20:36
@jonathanpeppers jonathanpeppers requested review from rmarinho and tj-devel709 and removed request for a team January 28, 2025 20:36
@rmarinho rmarinho merged commit b52fe4f into net10.0 Jan 28, 2025
15 of 65 checks passed
@rmarinho rmarinho deleted the dev/peppers/ios/nativeaot branch January 28, 2025 23:25
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants