Skip to content
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

Add Windows on ARM support #216

Closed
StefanStojanovic opened this issue Feb 22, 2023 · 3 comments · Fixed by #217
Closed

Add Windows on ARM support #216

StefanStojanovic opened this issue Feb 22, 2023 · 3 comments · Fixed by #217

Comments

@StefanStojanovic
Copy link

I've cloned this repo, built it, and tried running tests on a Windows 11 ARM64 machine. All tests failed with the STATUS_INVALID_IMAGE_FORMAT (0xC000007B) exit code. It would be good if Windows on ARM was supported in this project.

Why and how I caught a lack of support for Windows on ARM

Recently, there's been an effort to replace icu with simdutf in Node.js. Another effort, which I'm a part of, is working on adding Windows on ARM to the list of officially supported platforms (adding it to CI, etc.). We've noticed that recently there was a huge increase in failing tests in Node.js daily test runs on ARM64. One of those runs can be viewed here. After bisecting changes, I found out that this was caused by nodejs/node#46471, and also nodejs/node#46548 (I've seen a few more commits with similar changes, but they do not seem to break ARM64 tests).

StefanStojanovic added a commit to JaneaSystems/node that referenced this issue Feb 22, 2023
Many tests started failing on ARM64 Windows after migrating from icu to
simdutf. This change reverts those changes for the problematic platform.

Refs: nodejs#46471
Refs: nodejs#46472
Refs: nodejs#46548
Refs: simdutf/simdutf#216
@lemire
Copy link
Member

lemire commented Feb 23, 2023

I understand that you are using Visual Studio 2019 which does not run on ARM64. So you have to cross-compile:

cmake -G "Visual Studio 16 2019" -A ARM64  -DCMAKE_CROSSCOMPILING=1 -B buildarmold
cmake --build buildarmold

Take the produce binaries and copy them over to your ARM64 machine.

I have uploaded two binaries to my Google Drive, compiled with VS 2022 and VS 2019 respectively.

https://drive.google.com/drive/folders/123o3hC2Ws-_cY_AuPyUHH8CuxCxouZ_F

@lemire
Copy link
Member

lemire commented Feb 23, 2023

Note that if you try to run ARM64 binaries on x64, you will get an error (possibly STATUS_INVALID_IMAGE_FORMAT).

@lemire
Copy link
Member

lemire commented Feb 23, 2023

I am satisfied that this issue is fixed with PR #217 I will issue a patch release.

If there is still an issue, please document it carefully, in such a way that we can reproduce it.

@lemire lemire closed this as completed Feb 23, 2023
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

Successfully merging a pull request may close this issue.

2 participants