-
Notifications
You must be signed in to change notification settings - Fork 516
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
NativeAOT: Enable building app extensions with NativeAOT #20872
Conversation
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | ||
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with universal apps?
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work with the universal apps.
In fact, I discovered that we have a more general issue when building universal apps with NativeAOT and opened: #20903 about it.
For now, I commented out universal app extension tests with NativeAOT.
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | ||
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with universal apps?
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64", true)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", false)] | |
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", true)] |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c0610d4
to
8866177
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…aot-app-extensions
📚 [CI Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
@mandel-macaque @dalexsoto Regarding Rolf's comment about including universal app extensions tests with NativeAOT I opened: #20903 for tracking as we don't seem to properly support building regular universal apps with NativeAOT either. |
❌ [CI Build] Windows Integration Tests failed ❌❌ Failed ❌ Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 170 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
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:
xamarin-macios/runtime/nativeaot-bridge.m
Line 39 in 2e5ef1e
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