aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-08-27 19:38:14 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2019-08-27 18:21:21 +0300
commita107eab2949cf9750ed88a634118b31666c16c7a (patch)
tree2269deecd5c2745b8511333afad81b0e0f73701d
parent3a04d325aa8ac0f707689255b245ef59ba99be31 (diff)
downloadmeson-a107eab2949cf9750ed88a634118b31666c16c7a.zip
meson-a107eab2949cf9750ed88a634118b31666c16c7a.tar.gz
meson-a107eab2949cf9750ed88a634118b31666c16c7a.tar.bz2
environment: Fix detection of MSVC arch on arm64
The regex was incorrect, so it was matching 'ARM64' with 'ARM'. Make the regex more specific so that it matches: Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64 Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x86 Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for ARM64 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 etc.
-rw-r--r--mesonbuild/environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 892bba7..2675bca 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -853,7 +853,7 @@ class Environment:
else:
m = 'Failed to detect MSVC compiler version: stderr was\n{!r}'
raise EnvironmentException(m.format(err))
- match = re.search('.*(x86|x64|ARM|ARM64).*', lookat.split('\n')[0])
+ match = re.search(' for .*(x86|x64|ARM|ARM64)$', lookat.split('\n')[0])
if match:
target = match.group(1)
else: