summaryrefslogtreecommitdiff
path: root/mesonbuild/msetup.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-12-22 09:55:36 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-12-22 11:31:48 -0800
commitc37cd4fe9a764622cdc2107da9bdcfc47ce229a7 (patch)
tree027e7f50d1dded0776a1a6e2fa2ef571b8def0f3 /mesonbuild/msetup.py
parent35d89301a908a42b9fe1284dd616cffabdfc45aa (diff)
downloadmeson-c37cd4fe9a764622cdc2107da9bdcfc47ce229a7.tar.gz
stop using the interpreter holders for the MachineInfo
Anywhere we have that, we also have the Environment object, which is just wrapped by the Interpreter methods anyway. This avoids inderections that are unnecessary.
Diffstat (limited to 'mesonbuild/msetup.py')
-rw-r--r--mesonbuild/msetup.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
index 2c663ec6c..90227842f 100644
--- a/mesonbuild/msetup.py
+++ b/mesonbuild/msetup.py
@@ -196,18 +196,12 @@ class MesonApp:
# even to write `T.Callable[[*mlog.TV_Loggable], None]`
logger_fun = T.cast('T.Callable[[mlog.TV_Loggable, mlog.TV_Loggable], None]',
(mlog.log if env.is_cross_build() else mlog.debug))
- build_machine = intr.builtin['build_machine']
- host_machine = intr.builtin['host_machine']
- target_machine = intr.builtin['target_machine']
- assert isinstance(build_machine, interpreter.MachineHolder)
- assert isinstance(host_machine, interpreter.MachineHolder)
- assert isinstance(target_machine, interpreter.MachineHolder)
- logger_fun('Build machine cpu family:', mlog.bold(build_machine.cpu_family_method([], {})))
- logger_fun('Build machine cpu:', mlog.bold(build_machine.cpu_method([], {})))
- mlog.log('Host machine cpu family:', mlog.bold(host_machine.cpu_family_method([], {})))
- mlog.log('Host machine cpu:', mlog.bold(host_machine.cpu_method([], {})))
- logger_fun('Target machine cpu family:', mlog.bold(target_machine.cpu_family_method([], {})))
- logger_fun('Target machine cpu:', mlog.bold(target_machine.cpu_method([], {})))
+ logger_fun('Build machine cpu family:', mlog.bold(env.machines.build.cpu_family))
+ logger_fun('Build machine cpu:', mlog.bold(env.machines.build.cpu))
+ mlog.log('Host machine cpu family:', mlog.bold(env.machines.host.cpu_family))
+ mlog.log('Host machine cpu:', mlog.bold(env.machines.host.cpu))
+ logger_fun('Target machine cpu family:', mlog.bold(env.machines.target.cpu_family))
+ logger_fun('Target machine cpu:', mlog.bold(env.machines.target.cpu))
try:
if self.options.profile:
fname = os.path.join(self.build_dir, 'meson-logs', 'profile-interpreter.log')