Skip to content

Add support for Windows on ARM64 #1

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

Open
ader1990 opened this issue Nov 24, 2020 · 5 comments
Open

Add support for Windows on ARM64 #1

ader1990 opened this issue Nov 24, 2020 · 5 comments

Comments

@ader1990
Copy link

Hello,

I am trying to use greenlet with Python 3.8 / 3.9 on Windows ARM64, but there is a compilation issue when I try building it using VS Studio 2017 / 2019, as there is no support. Do you have any pointers on how this can be achieved?

I have also opened python-greenlet/greenlet#220 for guidance.

Thank you,
Adrian

@kristjanvalur
Copy link
Collaborator

Unfortunately I have not touched the greenlet project for a long time. The stack slicing code split up years ago from Stackless python into the Greenlet project.

I have already done this for the "stackman" project. I would suggest that you look at the difference between the ARM and ARM32 code here in this repository (the switch_arm_gcc.h and the switch_aarch64_gcc.h) look at the differences, and apply similar changes to the greenlet, creating a switcg_aarch64_gcc.h there.
The switching code cannot be taken directly since the arguments are slightly different. It will be mostly a case of renaming the registers (from r to x) and noticing the different register numbers that need to be preserved across calls for both architectures.

@kristjanvalur
Copy link
Collaborator

Another approach would be to create a shim, and actually use the stackman project here. I aim to actually submit the libs for the different arthcitectures into the repository.
In the stackless project, I made a PR that illustrates how the slp_switch() function can be implemented in terms of stackman_switch():

stackless-dev/stackless#230
Ideally, when I manage to make this project stable and have released libs available for all major platforms, projects like stackless and greenlets can actually just link with the comman code here.

I still haven't finished windows support for stackman, though. And I don't support any of the legacy platforms. Only arm, x86linux and x86 windows. (32 and 64) bits.

@kristjanvalur
Copy link
Collaborator

Hm, I see that you speak of windows/arm64. This is new to me. I have to finalize windows/86 support in this lib first, then maybe if I can get access to an ARM64 win machine....

@kristjanvalur
Copy link
Collaborator

windows support for X86/64 bit is complete, and theoretically it should also work for windows 10 on aarch64, but I have not had access to such a platform to test.

kristjanvalur added a commit that referenced this issue Apr 6, 2021
@kristjanvalur
Copy link
Collaborator

Github will be adding arm64 support by the end of the year to open source repos. i'll update the tealet repo to test the stackman code on windows 64 once that happens.
https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants