-
Notifications
You must be signed in to change notification settings - Fork 460
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
Draft: windows on arm lib support #5928
Conversation
Thank you for your PR. |
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.
Please also add one more CI flow to run ARM64 builds with mingw: https://github.com/BOINC/boinc/blob/master/.github/workflows/mingw.yml
@@ -75,7 +75,9 @@ void HOST_INFO::clear_host_info() { | |||
safe_strcpy(os_version, ""); | |||
|
|||
#ifdef _WIN64 | |||
#if !defined(__aarch64__) |
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.
All these are not required since WSL is supported on ARM64 devices as well: https://learn.microsoft.com/en-us/windows/wsl/install-manual
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.
ok, I'm encountering a relocation error during linking... let's see if I can find a better solution
@@ -148,6 +148,8 @@ | |||
#define SECURITY_WIN32 | |||
#endif | |||
|
|||
#include <cstddef> |
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.
is this really required?
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.
ok. Even with an empty hello world project, I'm getting LNK1112: module machine type 'x86' conflicts with target machine type 'ARM' , and the binary isn't generated. I'll see if there's a way to fix it somehow. Thanks |
unfortunately, using https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/ the app is crashing at boinc_init(). Without a backtrace or tools like gdb (which aren't available on Windows ARM), I probably won't be able to fix it. It would be great to support GCC 15 for building Win+ARM once it becomes officially available. https://www.phoronix.com/news/GCC-aarch64-w64-mingw32 but this change doesn't seem to be sufficient. |
btw I successfully built and tested the app in Visual Studio after installing additional ARM SDK libraries. |
Related to #4697
Description of the Change
this allows compiling BOINC libraries with https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/ for cross-compilation. Windows on ARM will officially be supported in the upcoming GCC 15.
Alternate Designs
Visual Studio is an alternative, it allows ARM targets, but it doesn't support cross-compilation, so using a GCC is more convenient because there's no need to access the real hardware.
while this change fixes the build
./configure --host="aarch64-windows" --with-boinc-platform="windows_aarch64" --disable-server --disable-manager --disable-client --disable-shared CXXFLAGS="-O3 "
I'm not sure what the platform string should be... ? https://boinc.berkeley.edu/trac/wiki/BoincPlatforms
I also have to run more tests to ensure it works with apps, so it's a draft for now, but any feedback is welcome. Thanks!