aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib
diff options
context:
space:
mode:
authorGabor Kertesz <gabor.kertesz@linaro.org>2021-10-14 11:27:08 +0200
committerXavier Claessens <xclaesse@gmail.com>2021-10-20 12:34:58 -0400
commit60c8fedb958ad5fb21d0624d1ceb260336e806e3 (patch)
tree338c85842b1ff4793c2b7157abc831be81ffe492 /mesonbuild/mesonlib
parentcf587f39eac997219a47acbc8f5a6f38c5d25b23 (diff)
downloadmeson-60c8fedb958ad5fb21d0624d1ceb260336e806e3.zip
meson-60c8fedb958ad5fb21d0624d1ceb260336e806e3.tar.gz
meson-60c8fedb958ad5fb21d0624d1ceb260336e806e3.tar.bz2
Add support for win-arm64 to MSVC
For Windows on Arm win-arm64 platform, the corresponding vcvars is called now.
Diffstat (limited to 'mesonbuild/mesonlib')
-rw-r--r--mesonbuild/mesonlib/vsenv.py6
1 files changed, 5 insertions, 1 deletions
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}')