@@ -246,12 +246,12 @@ if defined noprojgen if defined nobuild goto :after-build
246
246
set msvs_host_arch = x86
247
247
if _%PROCESSOR_ARCHITECTURE% _== _AMD64_ set msvs_host_arch = amd64
248
248
if _%PROCESSOR_ARCHITEW6432% _== _AMD64_ set msvs_host_arch = amd64
249
+ if _%PROCESSOR_ARCHITECTURE% _== _ARM64_ set msvs_host_arch = arm64
249
250
@ rem usually vcvarsall takes an argument: host + '_' + target
250
251
set vcvarsall_arg = %msvs_host_arch% _%target_arch%
251
- @ rem unless both host and target are x64
252
+ @ rem unless both the host and the target are the same
252
253
if %target_arch% == x64 if %msvs_host_arch% == amd64 set vcvarsall_arg = amd64
253
- @ rem also if both are x86
254
- if %target_arch% == x86 if %msvs_host_arch% == x86 set vcvarsall_arg = x86
254
+ if %target_arch% == %msvs_host_arch% set vcvarsall_arg = %target_arch%
255
255
256
256
@ rem Look for Visual Studio 2022
257
257
:vs-set-2022
@@ -261,7 +261,7 @@ echo Looking for Visual Studio 2022
261
261
@ rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
262
262
@ rem detect the version searched for
263
263
if not defined target_env set " VCINSTALLDIR = "
264
- call tools\msvs\vswhere_usability_wrapper.cmd " [17.0,18.0)" " prerelease"
264
+ call tools\msvs\vswhere_usability_wrapper.cmd " [17.0,18.0)" %target_arch% " prerelease"
265
265
if " _%VCINSTALLDIR% _" == " __" goto vs-set-2019
266
266
set " WIXSDKDIR = %WIX% \SDK\VS2017"
267
267
if defined msi (
@@ -301,7 +301,7 @@ echo Looking for Visual Studio 2019
301
301
@ rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
302
302
@ rem detect the version searched for
303
303
if not defined target_env set " VCINSTALLDIR = "
304
- call tools\msvs\vswhere_usability_wrapper.cmd " [16.0,17.0)" " prerelease"
304
+ call tools\msvs\vswhere_usability_wrapper.cmd " [16.0,17.0)" %target_arch% " prerelease"
305
305
if " _%VCINSTALLDIR% _" == " __" goto msbuild-not-found
306
306
set " WIXSDKDIR = %WIX% \SDK\VS2017"
307
307
if defined msi (
0 commit comments