From c6b37ef788bc8ab0ccf73c8eabdfc0dee37d6b01 Mon Sep 17 00:00:00 2001 From: Adam Kallai Date: Wed, 3 Apr 2019 09:08:09 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node-gyp/pull/1678 --- lib/configure.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/configure.js b/lib/configure.js index 32d77523ca..d8e2f20335 100644 --- a/lib/configure.js +++ b/lib/configure.js @@ -134,6 +134,9 @@ function configure (gyp, argv, callback) { // set the target_arch variable variables.target_arch = gyp.opts.arch || process.arch || 'ia32' + if (variables.target_arch == 'arm64') { + defaults['msvs_configuration_platform'] = 'ARM64' + } // set the node development directory variables.nodedir = nodeDir