aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 5f3c25f..072e7c3 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -990,11 +990,13 @@ class Environment:
else:
m = 'Failed to detect MSVC compiler version: stderr was\n{!r}'
raise EnvironmentException(m.format(err))
- match = re.search(' for .*(x86|x64|ARM|ARM64)$', lookat.split('\n')[0])
+ cl_signature = lookat.split('\n')[0]
+ match = re.search(' for .*(x86|x64|ARM|ARM64)$', cl_signature)
if match:
target = match.group(1)
else:
- target = 'x86'
+ m = 'Failed to detect MSVC compiler target architecture: \'cl /?\' output is\n{}'
+ raise EnvironmentException(m.format(cl_signature))
linker = MSVCDynamicLinker(for_machine, version=version)
cls = VisualStudioCCompiler if lang == 'c' else VisualStudioCPPCompiler
return cls(