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
pull/10540/head
Tad Young 2 years ago committed by Eli Schwartz
parent 5f8b0487ab
commit 4c706e961b
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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':

Loading…
Cancel
Save