summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/external_project.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-12-22 10:05:17 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-12-22 11:31:48 -0800
commit6ccd708f30e3649f6d531eebb8301132cb0f0759 (patch)
tree924efc690142069f24d4a9eaa6fb5598e2fb54c0 /mesonbuild/modules/external_project.py
parent7cbaa6613a84b0a1e4b37926950bf7879eb4776d (diff)
downloadmeson-6ccd708f30e3649f6d531eebb8301132cb0f0759.tar.gz
modules: get rid of the .*machine variables
They're hardly used, and can be gotten directly from the Environment instead
Diffstat (limited to 'mesonbuild/modules/external_project.py')
-rw-r--r--mesonbuild/modules/external_project.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/modules/external_project.py b/mesonbuild/modules/external_project.py
index bf482e217..5fdb0214c 100644
--- a/mesonbuild/modules/external_project.py
+++ b/mesonbuild/modules/external_project.py
@@ -65,8 +65,6 @@ class ExternalProject(NewExtensionModule):
self.project_version = state.project_version
self.subproject = state.subproject
self.env = state.environment
- self.build_machine = state.build_machine
- self.host_machine = state.host_machine
self.configure_command = configure_command
self.configure_options = configure_options
self.cross_configure_options = cross_configure_options
@@ -126,10 +124,10 @@ class ExternalProject(NewExtensionModule):
configure_cmd += self._format_options(self.configure_options, d)
if self.env.is_cross_build():
- host = '{}-{}-{}'.format(self.host_machine.cpu,
- 'pc' if self.host_machine.cpu_family in {"x86", "x86_64"}
+ host = '{}-{}-{}'.format(state.environment.machines.host.cpu,
+ 'pc' if state.environment.machines.host.cpu_family in {"x86", "x86_64"}
else 'unknown',
- self.host_machine.system)
+ state.environment.machines.host.system)
d = [('HOST', None, host)]
configure_cmd += self._format_options(self.cross_configure_options, d)