diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-10 01:49:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 01:49:16 +0300 |
commit | 06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf (patch) | |
tree | d6e80b4aa73a30e31861d35aa00127fd625fcca8 /mesonbuild/modules | |
parent | 6b4b601eafc5320e62060f39da5acad7c3007942 (diff) | |
parent | 6d6af46edcb765d7046533fdad4d03b0c0c9cd64 (diff) | |
download | meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.zip meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.gz meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.bz2 |
Merge pull request #4010 from Ericson2314/purge-cross-conditional-preview
Purge much `is_cross` and `<things>_cross` without changing user interfaces---includes on #5263
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/cmake.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/pkgconfig.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/python.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/windows.py | 9 |
5 files changed, 9 insertions, 8 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py index 8ce5aef..a36d748 100644 --- a/mesonbuild/modules/cmake.py +++ b/mesonbuild/modules/cmake.py @@ -110,7 +110,7 @@ class CmakeModule(ExtensionModule): self.snippets.add('subproject') def detect_voidp_size(self, env): - compilers = env.coredata.compilers + compilers = env.coredata.compilers.host compiler = compilers.get('c', None) if not compiler: compiler = compilers.get('cpp', None) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index a223b78..fd9e063 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1048,7 +1048,7 @@ This will become a hard error in the future.''') if state.environment.is_cross_build(): compiler = state.environment.coredata.cross_compilers.get('c') else: - compiler = state.environment.coredata.compilers.get('c') + compiler = state.environment.coredata.compilers.host.get('c') compiler_flags = self._get_langs_compilers_flags(state, [('c', compiler)]) cflags.extend(compiler_flags[0]) diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index d4d0625..0284f3d 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -397,7 +397,7 @@ class PkgConfigModule(ExtensionModule): dversions = kwargs.get('d_module_versions', None) if dversions: - compiler = state.environment.coredata.compilers.get('d') + compiler = state.environment.coredata.compilers.host.get('d') if compiler: deps.add_cflags(compiler.get_feature_args({'versions': dversions}, None)) diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 04941ea..2f4e5d6 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -211,7 +211,7 @@ class PythonDependency(ExternalDependency): if pyarch is None: self.is_found = False return - arch = detect_cpu_family(env.coredata.compilers) + arch = detect_cpu_family(env.coredata.compilers.host) if arch == 'x86': arch = '32' elif arch == 'x86_64': diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index 3b4eb15..efc3218 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -18,7 +18,7 @@ import re from .. import mlog from .. import mesonlib, build -from ..mesonlib import MesonException, extract_as_list +from ..mesonlib import MachineChoice, MesonException, extract_as_list from . import get_include_args from . import ModuleReturnValue from . import ExtensionModule @@ -41,16 +41,17 @@ class WindowsModule(ExtensionModule): def _find_resource_compiler(self, state): # FIXME: Does not handle `native: true` executables, see # See https://github.com/mesonbuild/meson/issues/1531 - # But given a machine, we can un-hardcode `binaries.host` below. + # Take a parameter instead of the hardcoded definition below + for_machine = MachineChoice.HOST if hasattr(self, '_rescomp'): return self._rescomp # Will try cross / native file and then env var - rescomp = ExternalProgram.from_bin_list(state.environment.binaries.host, 'windres') + rescomp = ExternalProgram.from_bin_list(state.environment.binaries[for_machine], 'windres') if not rescomp or not rescomp.found(): - comp = self.detect_compiler(state.environment.coredata.compilers) + comp = self.detect_compiler(state.environment.coredata.compilers[for_machine]) if comp.id in {'msvc', 'clang-cl', 'intel-cl'}: rescomp = ExternalProgram('rc', silent=True) else: |