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