build: support apple silicon (arm64 darwin) builds

Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: https://github.com/nodejs/node-gyp/pull/2165
This commit is contained in:
Samuel Attard 2020-07-09 14:31:23 -07:00 committed by Rod Vagg
parent ee6fa7d3bc
commit f461d56c53
No known key found for this signature in database
GPG key ID: C273792F7D83545D

View file

@ -132,6 +132,7 @@ function configure (gyp, argv, callback) {
variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
if (variables.target_arch === 'arm64') {
defaults.msvs_configuration_platform = 'ARM64'
defaults.xcode_configuration_platform = 'arm64'
}
// set the node development directory