Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Commit

Permalink
Add ARM64 Windows tool option
Browse files Browse the repository at this point in the history
Since Node.js is expected to support ARM64 Windows natively soon, this
change adds an option to the module, '--include-arm64-tools', to
install the extra Visual Studio 2017 bits required to build native
modules for it.
  • Loading branch information
jkunkee committed Feb 22, 2019
1 parent 054409b commit 08884ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Optional arguments:
* `--silent`: The script will not output any information.
* `--vs2015`: Install the Visual Studio 2015 Build Tools instead of the Visual Studio 2017 ones.
* `--dry-run-only`: Don't actually do anything, just print what the script would have done.
* `--include-arm64-tools`: Include the optional Visual Studio components required to build binaries for ARM64 Windows. Only available with the 2017 and newer build tools and Node.js v12 and up.

## Supplying Parameters to the VCC Build Tools

Expand Down
6 changes: 6 additions & 0 deletions src/utils/get-build-tools-parameters.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { BUILD_TOOLS } from '../constants';

const debug = require('debug')('windows-build-tools');

export function getBuildToolsExtraParameters() {
Expand All @@ -16,5 +18,9 @@ export function getBuildToolsExtraParameters() {
}
}

if (!!process.env.npm_config_include_arm64_tools && BUILD_TOOLS.version === 2017) {
extraArgs += ' --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64';
}

return extraArgs;
}

0 comments on commit 08884ec

Please sign in to comment.