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/windows.py | |
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/windows.py')
-rw-r--r-- | mesonbuild/modules/windows.py | 9 |
1 files changed, 5 insertions, 4 deletions
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: |