deps: cherry-pick 88260bf from node-gyp upstream #56073
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change cherry-picks a small change from node-gyp needed for running native tests on ClangCL compiled binaries. The change was already approved here, so this is just the official port after the changes landed in node-gyp. Next is the part of the description regarding this change from the original PR:
Enforce MSVC to be used for node-gyp. As far as I can tell, this is the intended way of using node-gyp on Windows. The issue with running the native suites is that now we use Clang to compile Node.js, so config.variables.clang is set to 1, which makes node-gyp generate project files for ClangCL. While we'd like to enable this, that is currently not the priority so for now enforcing MSVC would be the way to go the way I see it. The changes in create-config-gypi.js would be done as a PR in node-gyp and then floated in Node.js until the next node-gyp update.
Tagging relative teams: @nodejs/platform-windows @nodejs/node-gyp
P.S. Since it's already reviewed, I'll request fast-tracking and I'm planning to land it after the first approval.
Refs: nodejs/node-gyp#3098
Refs: #55784