You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.Exception: No entrypoint module
at ILCompiler.Program.Run() + 0x26bc
at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass227_0.<.ctor>b__0(ParseResult result) + 0x304
### Description
This PR enables building app extensions with NativeAOT.
App extensions are class libraries and to build them with NativeAOT we
must not specify `CustomNativeMain=true`. If we do, ILC would expect
that the input assembly has a managed Main as the module entry point.
Additionally, when building class libraries (with the absence of a
managed Main entry point), our static reference from:
https://github.com/xamarin/xamarin-macios/blob/2e5ef1eb1c14e185b29bbef091d227ed0c8cc875/runtime/nativeaot-bridge.m#L39
requires build-time symbol resolution. To avoid linking errors, we
generate an empty `__managed__Main`
in the native bootstrapping code of the app extension (e.g., in
`main.arm64.mm`).
### Testing
The unit tests have been introduced to test building app extensions with
both Mono and NativeAOT.
Executing an iOS app TodayExtension built with NativeAOT has been
verified manually on an actual device.
---
Fixes: #20653
NativeAOT doesn't work with app extensions:
from #19381 (comment).
We should try to make this happen.
It might require changes to NativeAOT if NativeAOT requires an entry point (since app extensions don't have an entry point).
The text was updated successfully, but these errors were encountered: