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

Instruction for building on ARM on windows #29416

Open
yashamon opened this issue Jun 19, 2024 · 7 comments
Open

Instruction for building on ARM on windows #29416

yashamon opened this issue Jun 19, 2024 · 7 comments
Labels
build building and installing Neovim using the provided scripts enhancement feature request platform:arm platform:windows

Comments

@yashamon
Copy link

yashamon commented Jun 19, 2024

Problem

I imported the project into visual studio 2022 (arm64 version) and it compiles just fine, but with target x86. Probably I need to modify CMake files to target arm64, but I am not a developer so no idea how to do that.

Expected behavior

Please provide some more instruction for compiling on arm on windows.

@yashamon yashamon added the enhancement feature request label Jun 19, 2024
@justinmk justinmk added build building and installing Neovim using the provided scripts platform:windows platform:arm labels Jun 19, 2024
@clason
Copy link
Member

clason commented Jun 19, 2024

Just to be clear, cross compilation is not supported. To build for ARM, you need to build on ARM.

@yashamon
Copy link
Author

I am on arm

@dundargoc
Copy link
Member

dundargoc commented Jun 19, 2024

Can I get some actual details? What error mesaage arenyou getting?

@yashamon
Copy link
Author

Nothing goes wrong, it just cross compiles to x86. Instead of compiling to arm64. I am guessing that is the default for cmake projects, but I don't know.

@justinmk
Copy link
Member

VS has a menu with options to choose a target.

@yashamon
Copy link
Author

yashamon commented Jun 19, 2024

It doesn't allow choosing an arm target. If I create a new desktop app project I can set target to be arm64. If I create a new cmake project this is not allowed, so it might be a current limitation of cmake + visual studio.

I also tried to compile form command line, I can do it with gcc but that gives the wrong target, I don't know how to force arm64 and also it appears gcc currently does not support windows arm64 target. So clang might be the way to go, but how?

@yashamon
Copy link
Author

I manually added the following CMake preset:
Mind you I don't know if this is correct.

{
"name": "arm",
"displayName": "arm",
"inherits": "base",
"architecture": {
"value": "arm64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
WIth this the compilation starts, but fails midway.

Severity Code Description Project File Line Suppression State Details
Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Luv (missing: LUV_LIBRARY LUV_INCLUDE_DIR) (Required is at
least version "1.43.0") C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake 230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build building and installing Neovim using the provided scripts enhancement feature request platform:arm platform:windows
Projects
None yet
Development

No branches or pull requests

4 participants