diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-04-05 10:33:24 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-04-06 16:09:13 -0700 |
commit | 2cfa6569352bc1e0436833e5eb58ab50b508b213 (patch) | |
tree | a49446d6d1a26ccbd704c8f2e631d5e1addf7be6 /mesonbuild | |
parent | 223858fd7d138dfbac3098a4a05fff1f1e0e0429 (diff) | |
download | meson-2cfa6569352bc1e0436833e5eb58ab50b508b213.zip meson-2cfa6569352bc1e0436833e5eb58ab50b508b213.tar.gz meson-2cfa6569352bc1e0436833e5eb58ab50b508b213.tar.bz2 |
environment: simplify handling of native files with no cross files
Instead of treating native files as always being for the build machine,
and then copying them to the host machine, treat them as for the build
machine only when a cross file is also present
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/environment.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 68354b8..54f608d 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -642,7 +642,9 @@ class Environment: binaries.build = BinaryTable(config.get('binaries', {})) properties.build = Properties(config.get('properties', {})) cmakevars.build = CMakeVariables(config.get('cmake', {})) - self._load_machine_file_options(config, properties.build, MachineChoice.BUILD) + self._load_machine_file_options( + config, properties.build, + MachineChoice.BUILD if self.coredata.cross_files else MachineChoice.HOST) ## Read in cross file(s) to override host machine configuration @@ -661,12 +663,6 @@ class Environment: if self.coredata.is_per_machine_option(key): self.options[key.as_build()] = value self._load_machine_file_options(config, properties.host, MachineChoice.HOST) - else: - # If we aren't cross compiling, but we have a native file, the - # native file is for the host. This is due to an mismatch between - # meson internals which talk about build an host, and external - # interfaces which talk about native and cross. - self.options = {k.as_host(): v for k, v in self.options.items()} ## "freeze" now initialized configuration, and "save" to the class. |