-
Notifications
You must be signed in to change notification settings - Fork 468
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 arm64 to MSVC hosts #2887
Add arm64 to MSVC hosts #2887
Conversation
Ah, it currently looks like cmake errors out at this time since it only expects x86 or amd64 for the host. |
It looks like if I modify the "toolset": "host=arm64" We stop passing in |
Is this screenshot from an arm64 machine where you scan for kits?
|
It is a screenshot from an arm64 machine where all 3 host compilers exist. There appears to be an issue with the cmake command that gets ran when attempting to configure with an arm64 host. |
Can you check your hard drives to see if all 3 host compilers exist? and share the paths here? |
Looking at the source code for CMake, it looks like ARM64 is all capitalized (and case-sensitive). Can you try that instead of |
|
Thanks for digging into this @bobbrow ! I had to do another check to get it back to lower case (otherwise I was missing [
{
"name": "Clang 15.0.1 (GNU CLI) for MSVC 17.5.33103.201 (Visual Studio Enterprise 2022 Preview - amd64)",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x64",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\x64\\bin\\clang.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\x64\\bin\\clang.exe"
}
},
{
"name": "Clang 15.0.1 (GNU CLI) for MSVC 17.5.33103.201 (Visual Studio Enterprise 2022 Preview - x86)",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x86",
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\bin\\clang.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\bin\\clang.exe"
}
},
{
"name": "Clang 15.0.1 (MSVC CLI) for MSVC 17.5.33103.201 (Visual Studio Enterprise 2022 Preview - amd64)",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "x64",
"toolset": "ClangCL,host=x64"
},
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\x64\\bin\\clang-cl.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\x64\\bin\\clang-cl.exe"
}
},
{
"name": "Clang 15.0.1 (MSVC CLI) for MSVC 17.5.33103.201 (Visual Studio Enterprise 2022 Preview - x86)",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "win32",
"toolset": "ClangCL,host=x86"
},
"compilers": {
"C": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\bin\\clang-cl.exe",
"CXX": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\Llvm\\bin\\clang-cl.exe"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - amd64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "x64",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - amd64_arm64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "arm64",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - amd64_x86",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "win32",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - arm64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "ARM64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "arm64",
"toolset": "host=ARM64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - arm64_amd64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "ARM64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "x64",
"toolset": "host=ARM64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - arm64_x86",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "ARM64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "win32",
"toolset": "host=ARM64"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - x86",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "win32",
"toolset": "host=x86"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - x86_amd64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "x64",
"toolset": "host=x86"
}
},
{
"name": "Visual Studio Enterprise 2022 Preview - x86_arm64",
"visualStudio": "f64f9d0b",
"visualStudioArchitecture": "x86",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "arm64",
"toolset": "host=x86"
}
}
] |
Ah, the test failure appears to be because arm64 as a host was added in Visual Studio 2022 17.4 and running against 2019 where arm64 is an invalid option. |
The test appears to be failing for something else, but there are a lot of errors printing out during Kit scanning that should be addressed before we take this PR. It should probably be addressed in |
The commit you just pushed works too, though I'd like to see if we can get a more accurate version number to test against. I believe we have APIs for that. Give me a minute. |
There is a |
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.
Looks great! Thanks so much for helping out! I'll follow up with an entry in the changelog to make sure you are recognized for your help.
This enables using native arm64 toolset
The following changes are proposed:
The purpose of this change
Visual Studio 2022 17.4 Preview introduced native build tools on arm64. This change enables the vscode-cmake-tools to detect the native tools so we can build with it instead of emulating x86/x64 to run the non-native build tools.