From 60c8fedb958ad5fb21d0624d1ceb260336e806e3 Mon Sep 17 00:00:00 2001 From: Gabor Kertesz Date: Thu, 14 Oct 2021 11:27:08 +0200 Subject: Add support for win-arm64 to MSVC For Windows on Arm win-arm64 platform, the corresponding vcvars is called now. --- mesonbuild/mesonlib/vsenv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mesonbuild/mesonlib') diff --git a/mesonbuild/mesonlib/vsenv.py b/mesonbuild/mesonlib/vsenv.py index fd1ca15..0d69d9a 100644 --- a/mesonbuild/mesonlib/vsenv.py +++ b/mesonbuild/mesonlib/vsenv.py @@ -2,6 +2,7 @@ import os import subprocess import json import pathlib +import platform import shutil import tempfile @@ -66,7 +67,10 @@ 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']) - bat_path = bat_root / 'VC/Auxiliary/Build/vcvars64.bat' + 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}') -- cgit v1.1