diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-12-22 10:00:13 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2023-12-22 11:31:48 -0800 |
| commit | 7cbaa6613a84b0a1e4b37926950bf7879eb4776d (patch) | |
| tree | af32163a8a269e7984d534548db6b562cab4d089 | |
| parent | c37cd4fe9a764622cdc2107da9bdcfc47ce229a7 (diff) | |
| download | meson-7cbaa6613a84b0a1e4b37926950bf7879eb4776d.tar.gz | |
backend/vs: use the host machine instead of the target machine
This could lead to subtle bugs if you happened to be building a project
that is some sort of toolchain (compiler, linker, etc)
| -rw-r--r-- | mesonbuild/backend/vs2010backend.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index c84b2e6f6..30f499149 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -225,27 +225,27 @@ class Vs2010Backend(backends.Backend): # Check for (currently) unexpected capture arg use cases - if capture: raise MesonBugException('We do not expect any vs backend to generate with \'capture = True\'') - target_machine = self.environment.machines.target.cpu_family - if target_machine in {'64', 'x86_64'}: + host_machine = self.environment.machines.host.cpu_family + if host_machine in {'64', 'x86_64'}: # amd64 or x86_64 - target_system = self.environment.machines.target.system + target_system = self.environment.machines.host.system if detect_microsoft_gdk(target_system): self.platform = target_system else: self.platform = 'x64' - elif target_machine == 'x86': + elif host_machine == 'x86': # x86 self.platform = 'Win32' - elif target_machine in {'aarch64', 'arm64'}: - target_cpu = self.environment.machines.target.cpu + elif host_machine in {'aarch64', 'arm64'}: + target_cpu = self.environment.machines.host.cpu if target_cpu == 'arm64ec': self.platform = 'arm64ec' else: self.platform = 'arm64' - elif 'arm' in target_machine.lower(): + elif 'arm' in host_machine.lower(): self.platform = 'ARM' else: - raise MesonException('Unsupported Visual Studio platform: ' + target_machine) + raise MesonException('Unsupported Visual Studio platform: ' + host_machine) build_machine = self.environment.machines.build.cpu_family if build_machine in {'64', 'x86_64'}: |
