aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTad Young <yyc12321@outlook.com>2022-06-26 17:21:20 +0800
committerEli Schwartz <eschwartz@archlinux.org>2022-06-26 08:10:12 -0400
commit4c706e961bcef8c2f4445eb4a24e3e6b2c86bbab (patch)
tree362a163a6e02c45657d2a98658641cce7650e3e8
parent5f8b0487abf501a09c51387791b578a148c973e2 (diff)
downloadmeson-4c706e961bcef8c2f4445eb4a24e3e6b2c86bbab.zip
meson-4c706e961bcef8c2f4445eb4a24e3e6b2c86bbab.tar.gz
meson-4c706e961bcef8c2f4445eb4a24e3e6b2c86bbab.tar.bz2
add missing lower() to fix msvc backend platform detection
Regardless of which MachineChoice we base the platform on, we compare its value to lowercased identifiers. So we need to lowercase the targetplatform too... but we only did so sometimes. This broke e.g. on "Win32", but only when *not* doing a cross build. Fixes #10539
-rw-r--r--mesonbuild/backend/vs2010backend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index f8472da..5711404 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -1312,7 +1312,7 @@ class Vs2010Backend(backends.Backend):
pdb.text = f'$(OutDir){target_name}.pdb'
targetmachine = ET.SubElement(link, 'TargetMachine')
if target.for_machine is MachineChoice.BUILD:
- targetplatform = platform
+ targetplatform = platform.lower()
else:
targetplatform = self.platform.lower()
if targetplatform == 'win32':