-
Notifications
You must be signed in to change notification settings - Fork 206
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
Visual C++ Support may not reliably detect MSVC #929
Comments
This makes sense. I would say sticking to x86.x64 for now since the plugin doesn't support other targets (there is no mechanism to select something else). If you make a MR I will test it. |
But this change suddenly makes it unusable on Windows on Arm64 (WoA) box, while the existing command:
does work on WoA. Should it be retained in preparation for WoA support in CDT? I'm willing to help in this WoA support in CDT. (FYI: Eclipse IDE 2024-12 now has packages for WoA, including the C/C++ Development package: |
I expect you would get the x86.64 target toolchain detected. So cross compiling x86.64 from Arm, along with matching defines, etc.
I don't think so, it means we only support targeting x86.x64 but the host architecture should not matter. There is already several places in the plugin that has x86.x64/amd64 target hardcoded (vcvars, defines). I would suggest using Component.VC.Tools.x86.x64 until there is a UI to select arm target then adjust the command. Alternatively we could assume host == target and only support targeting arm on arm host and targeting x86 on x86. But it would require more changes and I don't have a Arm64 Windows host to test. I think it would be pretty easy to check the osgi running host architecture and use that knowledge in the couple of places that x86/amd64 is currently hardcoded. No UI would be needed although not very flexible. |
@MarkZ3 I think you've misunderstood me completely. And perhaps I also misunderstood the purpose of this command:
used in the CDT code. As far as I can see the CDT doesn't detect MSVC as a valid toolchain at all on my Windows x64 box nor on my WoA box, let alone any cross-compile ability on either boxes. (FYI, no GCC tools are present.) Plus the CDT is missing a native plugin for WoA, so no compile/build/make is possible (i.e. missing the |
I'm not sure why the current command would work for WoA but not x64 for you. Perhaps there are components missing in your VS installation on the x64 box? More investigation would be needed. Does it display something when you run it on the command-line? Once an installation is found, it runs (The missing cdt.core fragment is another topic/issue yes). |
Hmm, yes I'm confused. Your first message says the command works on WoA and the second says it doesn't. Maybe you mean using the original command could work whereas the new command wouldn't? |
Currently,
org.eclipse.cdt.internal.msw.build.VSInstallationRegistry
detects the VS installation path using the following command line:However, this may not be perfect in some cases - for example, it will ignore a tools-only installation with MSBuild + VC but no IDE. (but instead unnecessarily detect a VS installation without VC?)
Referring to https://github.com/microsoft/vswhere/wiki/Find-VC, is it more reliable to switch to the following command line?
Or, more generally:
The text was updated successfully, but these errors were encountered: