diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-08-27 19:38:14 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-27 18:21:21 +0300 |
commit | a107eab2949cf9750ed88a634118b31666c16c7a (patch) | |
tree | 2269deecd5c2745b8511333afad81b0e0f73701d | |
parent | 3a04d325aa8ac0f707689255b245ef59ba99be31 (diff) | |
download | meson-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.py | 2 |
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: |