Skip to content

Commit c6b37ef

Browse files
committed
configure: Enable ARM64 single-toolchain build on Windows
When target arch is arm64, set_msvs_configuration platfrom in order to generate proper .sln/.vcxproj files for cross-compiling node modules to Windows on Arm, 64-bit. To use, run `set npm_config_arch=arm64` on the command prompt before `npm install`. PR-URL: #1678
1 parent 7a71d68 commit c6b37ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/configure.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ function configure (gyp, argv, callback) {
134134

135135
// set the target_arch variable
136136
variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
137+
if (variables.target_arch == 'arm64') {
138+
defaults['msvs_configuration_platform'] = 'ARM64'
139+
}
137140

138141
// set the node development directory
139142
variables.nodedir = nodeDir

0 commit comments

Comments
 (0)