aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-05-09 21:42:53 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-16 00:27:57 +0300
commit957d8e051c0c29beb0106e75ae7a71acc5c62cf5 (patch)
tree19bb30d1cca5db43b7f540b718a9607a23a6d96a /mesonbuild/interpreter.py
parent38b347ecd026b8b0f6b533392a23aeeda5221713 (diff)
downloadmeson-957d8e051c0c29beb0106e75ae7a71acc5c62cf5.zip
meson-957d8e051c0c29beb0106e75ae7a71acc5c62cf5.tar.gz
meson-957d8e051c0c29beb0106e75ae7a71acc5c62cf5.tar.bz2
Make `PerMachine` and `MachineChoice` have just `build` and `host`
Meson itself *almost* only cares about the build and host platforms. The exception is it takes a `target_machine` in the cross file and exposes it to the user; but it doesn't do anything else with it. It's therefore overkill to put target in `PerMachine` and `MachineChoice`. Instead, we make a `PerThreeMachine` only for the machine infos. Additionally fix a few other things that were bugging me in the process: - Get rid of `MachineInfos` class. Since `envconfig.py` was created, it has no methods that couldn't just got on `PerMachine` - Make `default_missing` and `miss_defaulting` work functionally. That means we can just locally bind rather than bind as class vars the "unfrozen" configuration. This helps prevent bugs where one forgets to freeze a configuration.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 1e8f972..0afbb10 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2047,12 +2047,12 @@ class Interpreter(InterpreterBase):
if not mock:
self.parse_project()
- # Initialize machine descriptions. We can do a better job now because we
+ # Re-initialize machine descriptions. We can do a better job now because we
# have the compilers needed to gain more knowledge, so wipe out old
# inferrence and start over.
- self.build.environment.machines.miss_defaulting()
- self.build.environment.detect_build_machine(self.coredata.compilers)
- self.build.environment.machines.default_missing()
+ machines = self.build.environment.machines.miss_defaulting()
+ machines.build = environment.detect_machine_info(self.coredata.compilers)
+ self.build.environment.machines = machines.default_missing()
assert self.build.environment.machines.build.cpu is not None
assert self.build.environment.machines.host.cpu is not None
assert self.build.environment.machines.target.cpu is not None