From 4c706e961bcef8c2f4445eb4a24e3e6b2c86bbab Mon Sep 17 00:00:00 2001 From: Tad Young Date: Sun, 26 Jun 2022 17:21:20 +0800 Subject: [PATCH] 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 --- mesonbuild/backend/vs2010backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index f8472da2c..571140432 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':