-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enable building NativeAOT for Apple mobile platforms #81780
Conversation
These changes allow the NativeAOT runtime to compile for and run on iOS, tvOS and MacCatalyst. Contributes to dotnet#81024
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThese changes allow the NativeAOT runtime to compile for and run on iOS, tvOS and MacCatalyst. Contributes to #81024, to actually compile an app we still have a few more changes that need to be upstreamed. /cc @dotnet/ilc-contrib @ivanpovazan
|
src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.LoadICU.iOS.cs
Outdated
Show resolved
Hide resolved
W.r.t. thunk mapping: I believe NativeAOT implements two strategies for how to generate these thunks. The current default ( |
Good point! My understanding is that |
Yes. It's used for delegates that have closure over some variables and need an associated context to reference the closure object, and the delegate is passed to native code. There's some test for it in
I think it may be worth creating an issue so that the knowledge about |
Turns out there are actually three different code paths for the thunks:
Currently there's no Unix code for anything but the UPD: I updated my prototype to generate the static thunks, on macOS it passes the PInvoke test, so that's a good start. |
5cebff1
to
c28bfd1
Compare
@@ -167,7 +167,7 @@ if(FEATURE_MERGE_JIT_AND_ENGINE) | |||
set(CLRJIT_STATIC clrjit_static) | |||
endif(FEATURE_MERGE_JIT_AND_ENGINE) | |||
|
|||
if (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_MACCATALYST) | |||
if (CLR_CMAKE_TARGET_OSX) |
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.
this was erroneously added in 45887d1, MacCatalyst isn't building this piece.
src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.LoadICU.iOS.cs
Outdated
Show resolved
Hide resolved
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.
LGTM, thank you!
These changes allow the NativeAOT runtime to compile for and run on iOS, tvOS and MacCatalyst.
Contributes to #81024, to actually compile an app we still have a few more changes that need to be upstreamed.
/cc @dotnet/ilc-contrib @ivanpovazan