php / php-src

The PHP Interpreter
https://www.php.net
Other
37.95k stars 7.73k forks source link

Build for Windows on ARM #15610

Open RiadhKHEDHIRI opened 2 weeks ago

RiadhKHEDHIRI commented 2 weeks ago

Description

Please. Windows on ARM-based is gaining traction as Microsoft is going all-in.

cmb69 commented 2 weeks ago

There are a couple of issues regarding arm64 builds for Windows:

And the biggest issue would be that if none of developers have an arm64 on Windows machine, we couldn't do any development there (at best some blind fixes).

Anyhow, I agree that we should ship arm64 builds for Windows as soon as possible, even if these would be only minimal builds, and highly experimental. Since I've managed to do a minimal arm64 cross-compilation, I'll see whether this can be done on a Github windows-2022 runner as well. That would be a start.

Would you be able to test these builds?

cmb69 commented 2 weeks ago

Et voilà, we have minimal arm64 builds for Windows: https://github.com/cmb69/php-ftw/actions/runs/10597236705.

Test reports are welcome.

PS: for now, only the date, hash, json, pcre, random, reflection, spl and standard extensions are available.

PPS: this is PHP 8.4.0beta4

cmb69 commented 2 weeks ago

And here are PHP 8.4.0beta4 builds with more extensions and SAPIs (see https://github.com/cmb69/php-ftw/actions/runs/10597760618/job/29368660966#step:6:296 ff for details): https://github.com/cmb69/php-ftw/actions/runs/10597760618

I guess that is as good as it goes (maybe OPcache could be added), until the dependency libraries built for arm64 are available.

cmb69 commented 2 weeks ago

Maybe good news (from https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/):

We expect to begin offering Arm runners for open source projects by the end of the year.

cmb69 commented 2 weeks ago

And another build (this time with OPcache, but without JIT): https://github.com/cmb69/php-ftw/actions/runs/10613146327

cmb69 commented 1 week ago

I started threads on the internal mailing lists a while ago (https://news-web.php.net/php.internals/125344 and https://news-web.php.net/php.internals.win/1285), but decision has been made. So I think this requires the RFC process. Anyone who is interesting in having PHP for Windows on ARM64 is welcome to pursue it.