From 13d59d75be140b32fbef8c54c5d689ed1e30926f Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 24 Apr 2019 13:11:56 +0800 Subject: [PATCH] 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. --- mesonbuild/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 3d5d3ab2d..0c0f00ae3 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'