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
{{ message }}
Repository navigation
[NativeAOT] Properly implement targeting iOS-like platforms rather than pretending to be macOS #87610
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).
Is this issue just about renaming macOS to OSXLike in the JIT and JIT/EE interface?
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:
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:
That compatibility check also uses TargetOS::IsMacOSX above which is currently broken #87794 without anything noticing - I don't know what this actually does.
If you think that we don't need this distinction in the JIT I can send a PR to rename OSX -> Apple.
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.
If you think that we don't need this distinction in the JIT I can send a PR to rename OSX -> Apple.
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.
Activity
ivanpovazan commentedon Jun 15, 2023
/cc: @akoeplinger
MichalStrehovsky commentedon Jun 16, 2023
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.
jkotas commentedon Jun 16, 2023
Is this issue just about renaming macOS to OSXLike in the JIT and JIT/EE interface?
filipnavara commentedon Jun 16, 2023
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).
MichalStrehovsky commentedon Jun 16, 2023
Instruction sets are configured here; the JIT doesn't decide this:
runtime/src/coreclr/tools/Common/InstructionSetHelpers.cs
Lines 26 to 34 in e141ce4
ivanpovazan commentedon Jun 16, 2023
@akoeplinger could you please add more context?
akoeplinger commentedon Jun 16, 2023
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.
MichalStrehovsky commentedon Jun 20, 2023
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?
akoeplinger commentedon Jun 21, 2023
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.
MichalStrehovsky commentedon Jun 21, 2023
That compatibility check also uses
TargetOS::IsMacOSXabove which is currently broken #87794 without anything noticing - I don't know what this actually does.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.
1 remaining item
JulieLeeMSFT commentedon Jul 6, 2023
cc @dotnet/jit-contrib. @jakobbotsch please take a look.
jakobbotsch commentedon Jul 18, 2023
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.
Rename IsMacOS to IsAppleOS in the JIT
Rename IsMacOS to IsApplePlatform in the JIT (#96090)