-
Notifications
You must be signed in to change notification settings - Fork 206
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
Support for ARM32 in NativeAOT #833
Comments
The core team working on the NativeAOT experiment in this repo does not have plans for it, but we are happy to accept contributions to make it work. |
I recall CoreRT had support on ARM but I never used it. I was actually looking for that cause I want to experiment with JNI libs but using Native NOT. |
Yes, we have received some contributions for ARM support in the past but it did not get pushed far enough to get official builds enabled, etc. |
Would be great if at least this could be the way for NET to support ARMv6. Compile to llvm -> ARMv6 or ARMv7 native. |
Arm is potentially a better use case for NativeAOT than x86. Arm devices tend to be used in resource constrained environments like IOT devices, raspberry pi's, etc. And can benefit more from the advantages of NativeAOT. The team I work on has an embedded linux device using OpenEmbedded as the operating system on an arm32 chip. We had to reject .NET as an option because we simply do not have the space for it, and we need fast startup time. NativeAOT seems like the perfect solution but we can't use it because it doesn't support arm32. |
Right now building of NativeAOT on Raspberry 3 (I assume that this is ARM32) fails with following error
|
This is what I do to make it compile on Raspbian on my Raspberry Pi 3B+ - GcProbe.S is just copy from ARM64 - __cdecl is not defined on ARM, so I suppress that - I resurrect RareFlags from CoreRT in hopes that this is make it works, but no luck I try to resurrect dotnet/corert@d9847af in changes to regdisp.h but seems to be I do wrong thing here, and I should resurrect definitions from there. I would like to understand is RareFlags are still valid way, and if not what's the proper way. See dotnet#833
Anyone got an overview of what's left to get NativeAOT running on ARM32? |
Depending on you ability to take risks. NativeAOT in basic form runs on ARM32 now. I mean Hello World running. Downside is that you need build it yourself. That's not compilcated just time consuming. If you want do not think too much about building NativeAOT, then following items left:
|
I would be fine with adding Linux ARM to the CI build. |
@pver you can still build ARM32 packages. Support is still somewhat limited and do not tested enough. Can you tell more about your case? Curious why do you need ARM32 |
@kant2002 currently have a .net application with mono on an armv7l platform, but running on some memory/performance issues/constraints. So I was test driving NativeAOT to see if that could improve things in the future :) But I'll do some further tests with it, building the packages myself as you suggested and see how far I can get with those |
@kant2002 I'm also using dotnet mainly on ARM devices, for IoT. Currently publishing using self-contained, since I don't have much space left on the device for full framework. If NativeAOT would give me smaller package or or faster startup time, it would be great. X86/64 devices have most of the times more storage, RAM or CPU power so there it's not so important I think. |
@pver are you run docker on ARM hardware? It seems to be you are running Docker image on Linux x64, and as such you may have to follow instructions for cross-compilation. https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/compiling.md#cross-architecture-compilation @pver and @michaldobrodenka if you discover any specific issues, would be good to post it in this repo, so they can be tracked. My experience with this repo, is that all issues taken seriously, it maybe just take a bit of time to solve all of them. |
@kant2002 thanks for the hint! I'm indeed running Docker from a Linux x64. I tried to build with the mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20200413125008-09ec757 (and the newer ubuntu-16.04-cross-20210719121212-8a8d3be) docker image for arm32, but maybe that's not enough to fully cross compile. I'll try with the manual steps to see if that runs better and create a new ticket if I keep running into issues. |
Has this still not been resolved? It's been nearly 2 years 😢 |
Very strange indeed, it seems to be supported based on this: But it's just not published? (only published for x64 platform packages at the moment). Or is this approach already in the spirit of dotnet/runtime#71042 ? |
As probably the last person who touch code for ARM32 I can say following. Instructions to get started with NativeAOT contribution can be found here https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/nativeaot.md |
This comment is misleading. I am going to delete it. This is list of RIDs that Microsoft.DotNet.ILCompiler may be pontetially built for, but it does not imply any kind of support. @kant2002 summary is accurate. We will be happy to accept contributions for native AOT Arm32 port. |
Let's close this in favor of dotnet/runtime#97729. |
Is there any plans to support ARM32? Basically so that you from a PC running Linux(amd64) could do:
dotnet publish -r linux-arm -c release
Or could you already today compile applications for ARM32 using NativeAOT?
The text was updated successfully, but these errors were encountered: