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

Fix Visual Studio installation detection for Arm64 #46420

Merged

Conversation

Blackhex
Copy link
Contributor

@Blackhex Blackhex commented Jan 30, 2023

When vcbuild.bat arm64 was run on Windows Arm64 machine, the vswhere_usability_wrapper.cmd was detecting proper installation of Visual Studio according to presence of x64 Build Tools which fails when there is only Arm64 version of the Build Tools.

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. install Issues and PRs related to the installers. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform. labels Jan 30, 2023
@Blackhex Blackhex force-pushed the fix-vswhere-arm64 branch 5 times, most recently from 3aca22a to 446769c Compare January 31, 2023 10:06
@bnoordhuis
Copy link
Member

@nodejs/platform-windows-arm

@Blackhex Blackhex force-pushed the fix-vswhere-arm64 branch 3 times, most recently from 970358a to d0517b9 Compare February 3, 2023 12:24
Copy link
Contributor

@StefanStojanovic StefanStojanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes break building on Windows x64.

@rem also if both are x86
if %target_arch%==x86 if %msvs_host_arch%==x86 set vcvarsall_arg=x86
@rem unless both the host and the target are the same
if %target_arch%==%msvs_host_arch% set vcvarsall_arg=%target_arch%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails on Windows x64, since it compares "x64" to "amd64"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thank you. Let me fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, I was OOF last week. Yes, this is fixed now.

@dennisameling
Copy link
Contributor

This might supersede #44226 in which I added VS2022-specific logic for ARM64, since VS2019 is not supported on that platform. But since MS actively discourages VS2019 installation on ARM64 devices, your approach in this PR is probably better and more future-proof.

@sxa
Copy link
Member

sxa commented Feb 6, 2023

@pbo-linaro Does this look ok to you?

@pbo-linaro
Copy link
Contributor

@StefanStojanovic will look into this.

Copy link
Contributor

@StefanStojanovic StefanStojanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if cross-compilation passes in CI.

@sxa
Copy link
Member

sxa commented Feb 13, 2023

LGTM if cross-compilation passes in CI.

I didn't think we had cross-compilation in the main CI just now so I don't think that scenario will be tested, unelss I'm missing something.

@StefanStojanovic
Copy link
Contributor

I didn't think we had cross-compilation in the main CI just now so I don't think that scenario will be tested, unelss I'm missing something.

In the node-compile-windows job, there is a win-vs2019-arm64 configuration, so although we are currently not testing ARM64 in the CI, we should be able to see if the cross-compilation passes at least.

@Blackhex
Copy link
Contributor Author

Please, let me know if there is anything specific I can do for finishing this PR on my end.

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 2, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 2, 2023
@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 2, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 2, 2023
@nodejs-github-bot nodejs-github-bot merged commit 0abe5ec into nodejs:main Mar 2, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 0abe5ec

targos pushed a commit that referenced this pull request Mar 13, 2023
PR-URL: #46420
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
targos pushed a commit that referenced this pull request Mar 14, 2023
PR-URL: #46420
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
PR-URL: #46420
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. install Issues and PRs related to the installers. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants