aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-24 13:11:56 +0800
committerJussi Pakkanen <jpakkane@gmail.com>2019-04-25 00:11:56 +0300
commit13d59d75be140b32fbef8c54c5d689ed1e30926f (patch)
treebd05cb0296b29ae42484b6374e560fb33c2e702b /mesonbuild
parentbbd67bbae93d0306e956d0ca0723bcf9cec1af20 (diff)
downloadmeson-13d59d75be140b32fbef8c54c5d689ed1e30926f.zip
meson-13d59d75be140b32fbef8c54c5d689ed1e30926f.tar.gz
meson-13d59d75be140b32fbef8c54c5d689ed1e30926f.tar.bz2
environment.py: Fix architecture detection on older MSVC
The cl.exe from Visual Studio 2010 and earlier report '80x86', not 'x86', for the architecture that the compiler supports. So, we ought to check for that as well to see whether we are building for 32-bit x86.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 3d5d3ab..0c0f00a 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -182,7 +182,7 @@ def detect_windows_arch(compilers):
# 32-bit and pretend like we're running under WOW64. Else, return the
# actual Windows architecture that we deduced above.
for compiler in compilers.values():
- if compiler.id == 'msvc' and compiler.target == 'x86':
+ if compiler.id == 'msvc' and (compiler.target == 'x86' or compiler.target == '80x86'):
return 'x86'
if compiler.id == 'clang-cl' and compiler.target == 'x86':
return 'x86'