@@ -145,6 +145,7 @@ class VisualStudioFinder {
145
145
version : process . env . VSCMD_VER ,
146
146
packages : [
147
147
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' ,
148
+ 'Microsoft.VisualStudio.Component.VC.Tools.ARM64' ,
148
149
// Assume MSBuild exists. It will be checked in processing.
149
150
'Microsoft.VisualStudio.VC.MSBuild.Base'
150
151
]
@@ -429,12 +430,21 @@ class VisualStudioFinder {
429
430
430
431
// Helper - process toolset information
431
432
getToolset ( info , versionYear ) {
432
- const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
433
+ const vcToolsArm64 = 'VC.Tools.ARM64'
434
+ const pkgArm64 = `Microsoft.VisualStudio.Component.${ vcToolsArm64 } `
435
+ const vcToolsX64 = 'VC.Tools.x86.x64'
436
+ const pkgX64 = `Microsoft.VisualStudio.Component.${ vcToolsX64 } `
433
437
const express = 'Microsoft.VisualStudio.WDExpress'
434
438
435
- if ( info . packages . indexOf ( pkg ) !== - 1 ) {
436
- this . log . silly ( '- found VC.Tools.x86.x64' )
437
- } else if ( info . packages . indexOf ( express ) !== - 1 ) {
439
+ if ( process . arch === 'arm64' && info . packages . includes ( pkgArm64 ) ) {
440
+ this . log . silly ( `- found ${ vcToolsArm64 } ` )
441
+ } else if ( info . packages . includes ( pkgX64 ) ) {
442
+ if ( process . arch === 'arm64' ) {
443
+ this . addLog ( `- found ${ vcToolsX64 } on ARM64 platform. Expect less performance and/or link failure with ARM64 binary.` )
444
+ } else {
445
+ this . log . silly ( `- found ${ vcToolsX64 } ` )
446
+ }
447
+ } else if ( info . packages . includes ( express ) ) {
438
448
this . log . silly ( '- found Visual Studio Express (looking for toolset)' )
439
449
} else {
440
450
return null
0 commit comments