-
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
[NativeAOT] Properly implement targeting iOS-like platforms rather than pretending to be macOS #87610
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionInitial support for targeting iOS-like platforms with NativeAOT introduced with: #81476 uses a workaround in JIT interface:
hardwiring the compilation as if the target platform is macOS which also brings along corresponding implications on the native side.
|
/cc: @akoeplinger |
What problem is this causing? If there are ABI differences (that this bit controls in the JIT), I'd expect we wouldn't be able to run a MAUI app. |
Is this issue just about renaming macOS to OSXLike in the JIT and JIT/EE interface? |
Does the flag control the ABI only, or can it have effect on something like the minimum expected architecture baseline? (which is different between M1 ARM and Axx ARM). |
Instruction sets are configured here; the JIT doesn't decide this: runtime/src/coreclr/tools/Common/InstructionSetHelpers.cs Lines 26 to 34 in e141ce4
|
@akoeplinger could you please add more context? |
That is an option, but when I initially did the iOS changes for NativeAOT I tried to add a new platform CORINFO_IOS etc but then hit some issues with the consistency checks here: runtime/src/coreclr/jit/compiler.cpp Lines 5852 to 5855 in 0570583
Back then I didn't have time to investigate further so we went with pretending to target macOS for iOS. |
The question is if there's anything different for iOS that we would need a new value to distinguish it in RyuJIT. We distinguish it as TargetOS in the C# part of the compiler, but only because there's one spot in the LLVM object writer that puts this into the object file (99.9% of the compiler doesn't see it as a different OS). Is there a part of RyuJIT that needs to know? |
As far as I can see the JIT would be fine with a generic "Apple" value, except for the compatibility checks. E.g. this one: runtime/src/coreclr/jit/compiler.cpp Lines 5874 to 5876 in 0570583
I assume we also use the Unix jit variant for iOS x64 (Simulator) today so presumably it works fine. If you think that we don't need this distinction in the JIT I can send a PR to rename OSX -> Apple. |
That compatibility check also uses
If we're only discussing renaming this within the JIT, this is now fully a JIT issue, so I'm moving this to that area and leaving the call on the JIT team. |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsDescriptionInitial support for targeting iOS-like platforms with NativeAOT introduced with: #81476 uses a workaround in JIT interface:
hardwiring the compilation as if the target platform is macOS which also brings along corresponding implications on the native side.
|
cc @dotnet/jit-contrib. @jakobbotsch please take a look. |
Indeed I don't think we need the distinction. Feel free to submit a PR to rename the value. I'm going to move the issue to future since this is just a cosmetic change. |
Now that we use it on iOS/tvOS as well, rename the variables to match. Fixes dotnet#87610
* Rename IsMacOS to IsAppleOS in the JIT Now that we use it on iOS/tvOS as well, rename the variables to match. Fixes #87610 * PR feedback, use IsApplePlatform instead.
Description
Initial support for targeting iOS-like platforms with NativeAOT introduced with: #81476 uses a workaround in JIT interface:
runtime/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Line 3066 in 8f19f4e
hardwiring the compilation as if the target platform is macOS which also brings along corresponding implications on the native side.
The text was updated successfully, but these errors were encountered: