Add support for win-arm64 to MSVC
For Windows on Arm win-arm64 platform, the corresponding vcvars
is called now.
@@ -2,6 +2,7 @@ import os
import subprocess
import json
import pathlib
+import platform
import shutil
import tempfile
@@ -66,6 +67,9 @@ def _setup_vsenv(force: bool) -> bool:
# VS installer instelled but not VS itself maybe?
raise MesonException(f'Could not parse vswhere.exe output')
bat_root = pathlib.Path(bat_info[0]['installationPath'])
+ if platform.machine() == 'ARM64':
+ bat_path = bat_root / 'VC/Auxiliary/Build/vcvarsx86_arm64.bat'
+ else:
bat_path = bat_root / 'VC/Auxiliary/Build/vcvars64.bat'
if not bat_path.exists():
raise MesonException(f'Could not find {bat_path}')
